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.
Merge pull request #278 from pphaneuf/sparse_entries

Add support for sparse entries.
Add a util::Task class to manage async operations.