Fixing up some issues seen with display modes reported from the Apple Studio Display:
- It has some pairs of modes that differ only in whether they are "usable for desktop." Switching to one of the modes that isn't results in an error. All other things being equal, we should prefer modes that are "usable for desktop" over those that aren't. - display_get_modes was returning multiple identical DEVMODEs. This is because we consider the kDisplayModeValidFlag and kDisplayModeSafeFlag values as making a display mode unique (and thus not comparable to other modes with the same resolution). Like above, the Studio Display has mode pairs that are identical except that one is "unsafe." We should compare modes with the same resolution, regardless of the safe and valid flags, and prefer safe and valid ones over the alternatives.