Added support for restoring records with their own DB connections

Previously, models with connections different to that of `ActiveRecord::Base` would be restored with a transaction on the wrong connection. Additionally, if there was no connection on ActiveRecord::Base, an exception would be raised.