connection: check for transaction before attempts to access objects in it

so Haraka doesn't crash
Merge pull request #549 from msimerson/connection

connection: check for transaction before attempts to access objects in i...