Fix mongo to pass with testsuite. Other improvements

- Fix mongo to pass with testsuite. 
- Added ClientAdadapter/ClientEntity for better inheritance. 
- Added possibility to configure mongo from external source