Put the members of FileDB protected by lock_ together (again).

This was originally done in 54a35437c715bdf2a3934ea48cf06c71abb65138, but accidentally undone by b3d5d358096c7029540ea908f10155cb75507436.
Add support for sparse entries in FileDB.
Add support for sparse entries in SQLiteDB.
Add a test for the sparse entries.
DO NOT MERGE.