[2.2] Batch writer thread empties buffer into channel

instead of each append call, which allows for less calls to
FileChannel#write and less I/O wait for append threads.

At least there's a very noticable difference on Windows,
not as much on linux unless in scenarios with high thread count.