Enable cache while making the core projects in-place

Contrib projects are made in a subprocess using the `make-process`
backend command, and they get the `'cache'` parameter set properly.
This is not the case of core, which is built separately.

This means that, in particular, any specified core patch will
not be cached.

Note: The pattern of enabling the cache / restoring the old value seems
weird and unnecessary to me, but it is the same used above in the
same function for fetching release information.