Get rid of r2.config.cache.

It's just a strange alias for g.cache.
thing: Clean up imports.
thing: Remove dead code.
thing: Make it possible to use different cache pools per type.