Add a function to determine whether a Qt window is main.

Unlike other operating systems, OS X has two distinct concepts for
window activation that affect behavior and drawing - key and main.

The key window is what Qt calls "active".

The differences between key and main windows are documented here:
https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/WinPanel/Concepts/ChangingMainKeyWindow.html

Change-Id: I2071f163e4774bbbcddbac24078086caa4466443
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>