Integration test to ensure that transactions cannot be hijacked

- Include some refactoring of SessionFactory
- Remove the potentially dangerous method getTransaction(final String txId) that would allow unauthorized access to transactions

Fixes https://www.pivotaltracker.com/story/show/66014686