Batch importer actually flushes the current window when told to

this to support proper shutdown of the neostore, where pending changes are
flushed and writes awaited so that the store can be closed properly.
Merge pull request #2787 from tinwelint/2.1-flush-bip-windowpool

Batch importer actually flushes the current window when told to