Terminate NSTask when Quit/ForceQuit Cakebrew.app

Some NSTask's process will remain if we quit Cakebrew.app while the task's running.

```bash
$ ps aux | grep brew | grep -v grep
tanb            22615   0.1  0.1  2493760   4472   ??  S    12:05AM   0:00.22 git-remote-https origin https://github.com/Homebrew/homebrew.git
tanb            22522   0.0  0.2  2467036   9600   ??  S    12:05AM   0:00.33 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -W0 /usr/local/Library/brew.rb update
```

I guess we should handle the quit event and terminate tasks.