window: reimplement restriction in moveResize
In restricted moveResize, try to guarantee at least a 100px contiguous block of the titlebar is visible. Previously this was implemented by shifting the geometry by 1px increments, trying to find a suitable position. This is inefficient and error-prone.
Replace this with an efficient algorithm that finds the closest candidate position. Consolidate the restriction code and add tests.
One remaining issues is that in multi-monitor setups, workspace()->restrictedMoveArea()
does not include the invisible area caused by the misalignment of the screens.
Edited by Yifan Zhu