dimming/undimming when gaining/losing app focus

This will dim all windows when you lose focus of Emacs 24.4+ and undim
the active buffer when you gain focus back. It's helpful for something
like a multi-monitor setup where you need to know which screen's app
currently has focus.