Fix tile maximize when vertical tiling is not possible

When tiling to the top edge should maximize the window (either because of the setting or due to the window being dragged from a maximized state), but the window is unable to tile vertically, maximizing doesn't work as expected. This pull request adds some additional logic to make maximize always work as expected when dragging to the top edge.

Fixes at least one of the issues in https://github.com/linuxmint/Cinnamon/issues/2863