Improve cleanup testing

building on aled's work in #1301

i've added a unit test which asserts cleanup

and i've added assertions about how much is allowed to leak

for now have decided to leave the leaked scheduler tag as it is also very small; the bigger offender appears to be tasks and locations which seem to leak if there are provisioning/startup failures