Corrected memory leak in the transaction implementation for neo4j.

See support from this neo4j issue for reference: https://github.com/neo4j/neo4j/issues/2101