Decouple Registry from the Cache package

Registry now implements ArrayAccess.
Cache class options have been changed to use an object that implements ArrayAccess (or just a plain array).