Fix transient and popup windows with the parent without a shell surface

Transient and popup surfaces may have the parent without a wl_shell_surface,
if the parent has the Qt::BypassWindowManagerHint flag set (like for
surfaces used for special purposes by a shell), so make them work anyway.

Change-Id: I20592a95b0a508a19506c9ea21ec44f9df5be9fb