Protect gcm_client_remove_device_internal() with a mutex to try and fix a libsane-related segfault