Convert loose object maps to work on loose object sources

The loose object map is currently written to operate at multiple levels at once:

  • It works on the generic stuct odb_source level.
  • It also works on the higher-level struct object_database level.

We should refactor the subsystem to work entirely on top of a struct odb_loose_source. Management of different sources needs to be moved into the object database layer.