Fix "maximize clicks" being counted in windows

In windows, double clicking the titlebar sent a click event.
This commit makes ponscripter ignore these.

It also, more strictly, ensures that a click event only occurs
if a mouseup follows a mousedown in the same position.