window: Set the surface to NULL when unmanaging
window: Remove pending pings in unmanage

This makes sure that we see them for Wayland clients as well, and don't
time out and crash when we're accessing an invalid window / surface.

Spotted-by: Rui Matos <tiagomatos@gmail.com>