Adding utility to wrap 'pub build' and generate errors if any new warnings occur

This is to catch cases where warnings are introduced into the examples but the build does not fail.

I've also opened dartbug.com/17978 to request that this functionality be included in `pub build`.