PTFM-11932 Add some diagnostics

* When PrioritizingThreadPool encounters an exception, print it (even
  though the consumer of the future may wish to suppress it).
* Add an assertion to ensure that _queue_lock is held when _next is
  called.
* More distinctive exception when reading 0th item from an empty queue.