Fixing the exit process.

Under some environments (especially windows), exiting the process too quickly with process.exit may hide
some errors or warnings logged with console.log but not yet displayed.
That's why a 'grunt.util.exit' utility already existed, but, it was not used everywhere instead of process.exit.
This commit fixes this and also adds a grunt.util.hasExited method which returns whether grunt.util.exit was called.
This method is now used after a task is completed, before trying to do anything more.