Use database specific quoting

This fixes problems where this gem may be used
on databases that don't care for the backtick 
quoting.

Also fixes a few ActiveSupport/ActiveRecord issues ...

* Allows for the usage of newer versions (3.x)
* Avoids ActiveSupport deprecations methods