Zend db nested transactions

This PR relies on #5001.

The goal is to be able to nest transactions, for instance, when you use a low level method in a batch.