ISPN-3903 Transaction Code Optimizations

* Refactor LocalTxInvocationContext and RemoteTxInvocationContext
(see JIRA for more details)