implement method for retrying database queries/transactionse

it is best practice to implement retry logic for transactions that are aborted because of deadlocks or timeouts. this makes such method available inside the DBAL and also add detection for errors where retrying makes sense in the different database drivers