Fix 797755 Allow X*IfEvent() to reenter libX11
- the activation logic is reverted
- there is also _XInternalLockDisplay() that needs protection
- I've found cases (in fvwm2) where the callback calls XCheckIfEvent() recursively. So the flag needs to be a counter.