add caching based on last-modified/if-modified-since headers

Fixes #6791

NOTE: the client tests are in https://github.com/npm/npm-registry-client/pull/87