Move creation of ODB sources into odb_new()

The creation of ODB sources is currently handled all over the place. This needs to be moved into a central place, ideally odb_new(), so that we can extend it to handle different kinds of object sources.

Edited by Patrick Steinhardt