PJ: replace rects_same macro and friends.

These were used to quickly compare 4 shorts, by recasting to 2 longs.
PJ: remove use of LONG as a shortcut to operate on 2 SHORTs.
PJ: suppress type-punning warnings.