Improve disposal of resources

Backends can now opt-in to automatic disposal of resources in the
UI thread.
Dispose tookit backends when disposing the main App
[Gtk] Dispose Cairo resources in the UI thread