AUTOTEST: Trim down database entries.

This script will cleanup the database by removing all job/test entries
prior to the provided date.

It first cleans up all tables that use the test/job id as a foriegn keys,
by doing a delete using join statements. Once those tables have been cleaned
up, it will delete the entries from tko_tests and tko_jobs.

BUG=chromium-os:34056
TEST=Worked successfully on atlantis3.mtv

Change-Id: I5645f449b9fdeebe537e2311b317984e0d969240
Reviewed-on: https://gerrit.chromium.org/gerrit/32050
Commit-Ready: Simran Basi <sbasi@google.com>
Reviewed-by: Simran Basi <sbasi@google.com>
Tested-by: Simran Basi <sbasi@google.com>
diff --git a/tko/db.py b/tko/db.py
index 72c897f..6a2eb13 100644
--- a/tko/db.py
+++ b/tko/db.py
@@ -135,6 +135,10 @@
         self.con.commit()
 
 
+    def rollback(self):
+        self.con.rollback()
+
+
     def get_last_autonumber_value(self):
         self.cur.execute('SELECT LAST_INSERT_ID()', [])
         return self.cur.fetchall()[0][0]