Added constructor that accepts a DB object, to facilitate mocking.

Just overloaded the MongoDBGraph constructor to support passing in a database object, which can be provided by any number of replacement databases (read: Fongo) to facilitate easier testing. It should be 100% compatible with existing changes, and makes development easier.