Added option to use MongoDB URI for connecting to MongoDB db or replica set