[WIP] Automatically group short tasks in batches

This is based on an online evaluation of the batch completion time to dynamically tune the size of the batch of tasks to dispatch at once to a worker.

TODO:

- [ ] ensure tests pass on windows
- [ ] update the change log