move batching logic to parent class and strings

- previously mentioned bug was not a bug, just query errors from
workers timing out
- moved batching logic to abstract parent class, refactored methods
to pass contexts around less and use string builders instead
-- this is especially helpful for what were previously many small
writes in some start/ end methods
- batch sizing is based on string length so it should be more
accurate for variable length bundles