Print warnings to the console after all tests run

The code here is inspired by a blog post by Myron Marston:

<http://myronmars.to/n/dev-blog/2011/08/making-your-gem-warning-free>