Clean up. 

cleaning out EOFs and replace with define_method and define_singleton_methods.

I broke up the file into three.  CacheTypes, ClassMethods and InstanceMethods for better clarity.  It makes it a lot easier to compartmentalize and work on the code.  Thoughts on the naming convention are welcome. 

I thought about breaking out each cache method into it's own file, because that `with_association` definition is a behemoth but that felt counter productive.