Some work on unhandled rejections.

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