Encapsulate flippedness of CG window frames better.

Also use `CGDisplayBounds` to establish on which screen a window resides, instead of horrible and fragile hacks attempting to get `NSScreen` frames and CG frames to conform to each others' coordinate spaces.