Refactored transaction state into its own object. Each transaction creates a new transaction state object upon initialization.
Merge pull request #9011 from wangjohn/activerecord_transaction_state

Refactored TransactionState into its own class