pointer/keyboard: Unset focus_resource when the surface is destroyed

focus_resource is supposed to be set only if focus_surface is
as well.