Patch to ActiveRecord transactions

ActiveRecord has a bug and and couple of inconsistencies when rolling
back multistatement transactions. There is a patch to fix the issues
at https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2991-after-transaction-patch