Cache management fixes
This branch applies a series of misc fixes around artifact cache quota and management.
Most notably, it now ensures the cache will be cleaned up if required at startup before ever launching any job which risks trying to write to the cache.