Add events for batch-wise flushes/commits/etc

The `worker:run` command does not offer a way to perform certain actions batch-wise, like flushing/clearing the entitymanager, committing to a search index, etc.

It would be handy if you could attach some sort of event to an executor (or the QueueManager), which is triggered at a given frequency of completed jobs.