Turn autocommit off for bulk inserts.

This caused a big performance regression in the last commit,
especially noticeable on sableamd2 where queries were taking
up to a minute.