Eliminate flashing on window/app focus once and for all.

Doesn't depend on any "features" in OS X (as the original Shroud method did), however does introduce heuristics for discovering the "frontmost" window, which seem pretty robust in practice.