Make SQLiteDB<>::db_ const.

For my own peace of mind...
Make the SQLiteDB<> class threadsafe.
Make a few pointer members of FileDB<> const.

Also check them for null.
Make the FileDB<> class threadsafe.