Ensure that Doctrine1 module opens/closes transaction on same connection

Because for some weird reason in my case it was failing to rollback the transaction, claiming that there was no transaction to begin with. But it was.

And another one: codeception may call _after() two times if the test has failed (is this even ok?), and the second call will fail because of the already closed transaction. FIxed this too.