Improve ActiveRecord patching

Hey,

I was having issues making this gem load AFTER the transaction_retry gem, because transaction_retry uses a crazy Railtie config.after_initialize to load the patch after Rails has initialized. I found that if I don't use alias_method, that ar_after_transaction never loads if I put require 'ar_after_transaction' in the config.after_initialize block. (Gemfile has to have :require => false)

The reason I want to load this gem after transaction_retry is that I don't want transaction_retry to retry the entire transaction when after_transaction blocks fail.

So the base code hasn't really changed, but this is a workaround for compatibility with other gems.

I don't think this will be an issue for the majority of people... probably further testing with other gems is necessary.

I included a test for this! You can revert the base code to see how things fail.