Reset num-attempts atom between tests. Simplify with-transaction-retry by calling with-transaction* directly rather than the helper macro.