Make DB a class instead of a singleton.

This is more aligned with how we treat APIs (given that Impromptu is a class) and has the added benefit of making it easier to manage state in the database unit tests.