fix: create cache dirs to avoid file copy errors

This fixes builds that don't use caching.
fix: Ensure that the yml result is deterministic when cache is used

The common/build caches may leave behind artifacts which don't affect the
final results. For example, a lib may be updated from v1 to v2, and both
source files may exist in the global cache. People will eventually end up with
different files cached.

To avoid this, the resulting cache checksums are moved to a new file which is
allowed to vary between builders.
docs: update cache doc to reflect cache checksum changes