MULE-7907: Ensure to call connection's close method on commit and rollba...

...ck operations.
The break is there. The switch is there because I need to point to the commit method on both the connection and the transaction, and the same for the rollback, and extracting the logic to a common method makes it clear that both tests do the same but one for the commit op, and the other for the rollback.