Deadlock handling

To resubmit deadlocked transactions to get a realistic time measurement. You can count average response time with and without deadlocks.