sharing: Stop systemd service waiting when daemon is stopping
When the sharing manager is stopped, some async calls are done to stop some services. If the main loop is stopped before, those calls are not handled properly and the services are left orphaned.
Stop the manager first and wait a few seconds before stopping the main loop to allow the async calls to finish successfully.
This fixes an issue where the gnome-remote-desktop-handover.service was not stopped on logout. Making the session on a new login, use the same old handover daemon which is still listening to the old handover iface with the old session id.
Edited by Joan Torres