Added grunt.task.exists method to check if a task exists. Closes gh-1131.