Refactoring to remove global cache.

Now there are individual cache objects that can have their own caching
policies, cache clearing, etc. Functionally, they work much like the
old `reppy` module.
Manual edit to include Wiktor Bachnik (wbachnik)'s changes