Change syntax for MongoDB connections from host:port to Mongo URI

* Added support for Mongo URI in order to connect to  mongo replicasets, set database names and other options from the .properties file

* Some small bugfixes