sound-player: Don't deadlock in finish_cb

The function finish_cb can be called as a result of a call to ca_context_cancel
in cancelled_cb. This will result in a deadlock because, as per documentation,
g_cancellable_disconnect cannot be called inside the cancellable handler.

It is possible to detect if the call to finish_cb is caused by ca_context_cancel
checking if error_code == CA_ERROR_CANCELED. To avoid the deadlock we should
call g_signal_handler_disconnect instead g_cancellable_disconnect if this is the
case.

GNOME/mutter!474
3 jobs for !474 with fix-deadlock-in-meta-sound-player in 5 minutes and 56 seconds (queued for 2 seconds)
latest detached
Status Job ID Name Coverage
  Review
passed #236144
check-commit-log

00:01:17

 
  Build
passed #236145
build-mutter

00:01:41

 
  Test
passed #236146
test-mutter

00:02:56