Ensure consistency of main and post configuration by storing and
restoring it from state, which in turn ensures cache key stability.
Also:
* Fixed some typos.
* Use core.error for logging errors.
* Fix inverted condition on cache-all-crates.
Reverts: #138Fixes#140
Add cache-all-crates option which allows all crates to be cached instead
of just the dependency crates. This is useful when additional crates are
required for CI tooling.