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)

If I load things normally in the Gemfile, things work but transaction_retry always loads after ar_after_transaction

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, because this approach in transaction_retry screwed with this gem, then this might screw with other gems :(

I included a test for this! You can revert the base code to see how things fail.