Recover from a lost button released event
This is a fix for zoom tool only. Gesture controller is loosing track of mouse button release events, leading to stranded selection rectangles and no zooming action. It is relatively easy to recover from this bug by examining button state in mouse move event. It's not perfect, but much simpler than alternatives.
Same problem as described here: #4749