PR for code review.

There are three levels to the MongoDB connection: The client, db, and collection. I initially created only the client, because it is not a difficult thing to get the db object from the client to set in your resources. It thought it might be worth it to be able to set the db in the configuration and created the db factory to support it. 

After reading your comment, I think it would be better to have a single configuration factory though that allowed you to get any level based on the configuration properties. I will look into this.