Adding support for DataMapper

Basically we had to change every usage of

ActiveRecord::Base.connection
to use the new abstraction we created.

This led to more problems than expected when dealing with threading issues and connection availability to each thread.