Reduce the probability of test flakiness in server

Some transactions have been shown to be prone to transient transaction failures, such
as from DeadLockExceptions. Those transactions will now be retried a limited number of times.