Some work on unhandled rejections.

This fixes #262, and along the way does some cleanup and code-clarity work.

As part of being able to test #262, I exposed `Q.unhandledReasons`.