Rollback to autocommit, except for sequence  iteration

Keeping the transaction active for the entire request increases the
likelihood of a deadlock on Galera clusters.