Allow to interrupt housekeeping tasks and fix some leaks

Patch by Raymond Wagner: implement Terminate methods for ArtworkTask and ThemeUpdateTask.
Once a MythSystemLegacy had completed it wasn’t deleted.

This speed up exiting mythbackend greatly, from ~30s to about 5s on my system