Despite remarkable progress this is only nearly working. After some
hours of try-n-error I decided to not follow this path any longer.
As a matter of fact the whole db code of this plugin is broken by design.
I've already straightened it a bit, but the custom db cursor implementation
seems evil. Reinventing connection wrapper code by own compatibility was
never smart and is bound to be finally brocken after upcoming switch fromenv.get_db_cnx to the new with_transaction, that has much more
intelligent transaction handling in general.

Hitting this bug introduced in changeset [3967] three years ago has been a
self-rewarding experience when digging further into Trac db connector logic
while working on TracForms code to become PostgreSQL compatibile.