Fix #781 and #808

As we are not caching/building the +opam.tar.gz anymore, the checksum checking code was not used anymore. Fix that, and use a cache of upstream packages as well.