Resolve deadlock on background change.
Due to how glib handles file monitors in a separate thread, unreferencing a monitor without canceling first can cause a race and deadlock.
For more details, refer to upstream issue: https://gitlab.gnome.org/GNOME/glib/-/issues/1941
Fixes #188 (closed)
Signed-off-by: Dan Merillat git@dan.eginity.com