Overhauled DispatcherWrapper.queueCmd to better support unit tests (formerly it was
swallowing errors).