Alternative monitor edge algoritm to fix GNOME bug #684212, and side-by-side tiling (mostly backported from Mutter).