Support committing Lucene writes within a fixed interval

The ramBufferSize and maxBufferedDocs options control how often the
writer is flushed, but this does not fsync files on disk and thus
might not be permanent, particularly in a machine under heavy load.

Add an option commitWithin to bound the time between calls to commit.
Give each sub-index its own executor to flush and commit outstanding
changes. Non-positive periods trigger commit on every write.

Change-Id: Idfaf17a1eeb9240f25ee1fc842bdf4f8c9b873c3
4 files changed