Extend resources.ini to contain all resources, including ldap

Remove the old calls to DbAdapterFactory and use ResourceFactory instead. Remove
the DbAdapterFactory and fix all unit tests that have been broken due to the changes.
Change the functionality of the ResourceFactory to also handle LdapConnections

resolves #4587
Merge branch 'feature/extend-resources-ini-4587'