Add some missing exitQgis() calls to unit tests

Also ensure that compositions are deleted before exiting
Qgis during tests.
Try to fix some more intermittent composer tests