Add sugar for capturing messages.

For use in custom routing scenarios as well as unit tests.

Fixes #47.