ECPG: Fix tracking subtransactions: a new SAVEPOINT with an
already existing subtransaction name releases (commits) the
previous one and open the new one.

Add a regression test to exercise certain aspects of the
client-side tracking of cursors and subtransactions.