Refactored connection string parsing in order to add tests unreliant on MongoDBTest.

Parsing needs work. Don't actually merge this with GH.