Popup: Fixes closing the popup unexpectedly by race conditions.

* A focusout followed by a focusin sometimes trigger events in reverse order,
      but should not close the popup nevertheless. Or a click-in-the-popup followed
      by a focusout should also avoid closing it unexpectedly;
* _closeTry and _closeVet work together to close the popup, but making sure no
      other event vets it;