Refactored connection string parsing in order to add tests unreliant on MongoDBTest. Parsing needs work
Improve validation of URI parsed parameters.

username and db_name must be defined and non-empty.  password can be
empty.

Previously, all those values had to be true, which is overly
restrictive.
get DatabaseError message from $err if errmsg doesn't exist