Make the write batch size configurable

It turns out that smaller batch sizes are causing too much
overhead. It's not clear why, but empirical testing shows a 10x increase
in write speed when the batch size increases from the previous hard
coded 64K to 10M.
remove some unused constants
Optimize writing to multiple series
Optimize deletes
don't append to the original slice