[bugfix] Ensure that the main loop is distroyed when all the objects which use it are destroyed.
That prevents a crash on Flexisip termination which happened because some singleton objects need to unregister themselve from the main loop on destruction whereas singleton object are destroyed after main() return.
Edited by François Grisez