pointer: Make sure to update the focus after ending a grab

Otherwise, we might not reset it after the grab has ended.
pointer: Repick after the focused surface is destroyed

Having a null focus is incorrect -- we want to pick the surface that's
under the new pointer position.
window: Ensure that popup window types propagate their focus appearance

In Wayland, popup window types are not override-redirect, and thus can
steal window focus away from their parent window when clicked on.

This means that we need to make sure their appearance is properly
propagated to the parent windows so the parent windows don't lose their
focus while they're propagated.
wayland: Immediately give keyboard focus to Wayland popups