Nested transactions for postgres

I need to support nested transactions for postgres.

A `begin` from a transaction will start a savepoint with a random name.
A `rollback` from a nested transaction will rollback to the savepoint.
A `commit` from a nested transaction will release the savepoint.

(This is WIP, but I'm not sure what's the best implementation, feedback/help is welcomed)