Add `shutdown()` method to `QueueProcessingThread`

* Adds explicit `shutdown()` method to `QueueProcessingThread`.
* This is what callers would have to do anyway to make sure that the poller is cleanly exited. This just moves the code into here instead of the callering having to do it.

Ping @mikaellothman and @xiaodong-izettle