ShellApp: Use g_signal_connect_object for window signals

A window being unmanaged can cause the ShellApp to be removed from
the ShellAppSystem, which if we are unlucky is the app's last
reference, causing it to be disposed and freed. It would be bad if this
happened before we finished handling the signal.

Use g_signal_connect_object to ensure that a reference is held to
the ShellApp for the duration of the signal handler, delaying its
last-unref.

Signed-off-by: Simon McVittie <smcv@debian.org>
4 jobs for !497 with wip/app-empty-window-list in 27 seconds (queued for 2 seconds)
latest detached
Status Job ID Name Coverage
  Review
failed #274424
check_commit_log

00:00:27

 
  Build
skipped #274425
build
 
  Test
skipped #274426
test
skipped #274427
test-pot
 
Name Stage Failure
failed
check_commit_log Review
 * [new tag]         3.9.92                  -> 3.9.92
Checking out ea642989 as wip/app-empty-window-list...

Skipping Git submodules setup
$ ./.gitlab-ci/check-commit-log.sh
From https://gitlab.gnome.org/GNOME/gnome-shell
* branch master -> FETCH_HEAD
Missing merge request or issue URL on commit ea642989
ERROR: Job failed: exit code 1