[autotest] Increase timeout for connecting TKO db.

Also log stats to counter tko_db_con_error if connection attempt timed out.

BUG=chromium:539984
TEST=None

Change-Id: I228493e83297b9894c285b472052b88a44864a1e
Reviewed-on: https://chromium-review.googlesource.com/304351
Commit-Ready: Dan Shi <dshi@chromium.org>
Tested-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Fang Deng <fdeng@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
diff --git a/tko/db.py b/tko/db.py
index 4c611f2..5c06475 100644
--- a/tko/db.py
+++ b/tko/db.py
@@ -106,9 +106,13 @@
             self.con.close()
             self.con = None
 
-        # create the db connection and cursor
-        self.con = self.connect(self.host, self.database,
-                                self.user, self.password, self.port)
+        try:
+            # create the db connection and cursor
+            self.con = self.connect(self.host, self.database,
+                                    self.user, self.password, self.port)
+        except:
+            autotest_stats.Counter('tko_db_con_error').increment()
+            raise
         self.cur = self.con.cursor()