This will clear the entire cache in between runs
when running with SALT_FROM_SCRATCH=false.
Originally, only sls and other files in the state tree were cleared,
but since external modules and other files also need to be cleared,
just clear everything for robustness.

Additionally, move this to after we checkout the new code,
since we sync everything after invalidating the cache,
and we want to sync the new configuration instead of the old one.