Further optimize sql insertion
This changeset tries to reduce the number of batch insertions
by increasing the size of the event queues.
To avoid that low-traffic schemas have to wait for a long time
until the queue is full, schema queues whose first and last
events are more than 5 minutes apart, are flushed to insertion