Check that window is visible on restore (win)

Check that window is visible on any screen when restoring window size
and location. If its not visible on any screen, move it to the primary
screen work area. Should fix #577, fix #583