Alter the single modifier code to use device independent key masks as opposed to key codes

Fixes #1712
add brackets round ternary operator
Use @() for NSNumber creation
Merge pull request #1723 from quicksilver/1712

Alter the single modifier code to use device independent key masks as opposed to key codes
Updates the QSWindow to no longer maintain a list of retained windows, and also updates the QSLargeTypeDisplay's window to release itself when closed.
Merge pull request #1739 from craigotis/qswindow-leak-fix

Fixes a QSWindow retain issue