Add a handler for uncaught script errors and log them as grunt errors.
Add a logErrors option to control whether script errors are logged to grunt.

The option currently defaults to false.
Merge branch 'log_errors' into file_output