Work in progress porting from SQLite to MySQL.

- Basic fetch queries should work but that path will have a lot of debug
  output that will want deleting.

- Stats and other queries not ported at all

- Connection variables currently hardcoded and should be a config

- This branch started out as an attempt to do transactionless SQLite
  version with atomic operations so there may be cruft from that to
  clean up.

Change-Id: If4b2c2518f296a89a409a3a5328de5fc88aeac3b
Merge "Work in progress porting from SQLite to MySQL." into rt_testing