Clean up singletons and make them disconnect signals. Also add a test case.
Depends on mutter!2934 (merged)