Add support for growlnotify and fg/bg detection in OSX

Allows notifications to be sent using growl, which also works on 10.9+ (in a similar way to terminal-notifier.)

Also uses applescript to discover if emacs is in the background.