Add a custom PDO wrapper to handle nested transactions.