Bulk mode support

Implement generic bulk insert buffer functionality that lets us do large batch buffering in memory and then a single bulk IO operation: really only usable for batch import jobs where there is no expectation that the database will be moving as well.
Implemented support for the MySQL INSERT...ON DUPLICATE KEY UPDATE statement.
Added code to use the insert multiple form for bulk inserts.
Disabled compaction for MySQL (since we're using INSERT...ON DUPLICATE KEY UPDATE).
Added indexing when creating the table in MySQL.