desktop-shell: extract view_get_transform, make it reliable

Avoid crashes related to get_shell_surface returning NULL.

Surfaces are already allowed to be neither focus nor shell in
e.g. focus_state_surface_destroy.
2 jobs for view_get_transform in 3 minutes and 54 seconds
Status Job ID Name Coverage
  Build
passed #94604
build-native-autotools

00:03:54

passed #94605
build-native-meson

00:03:14