New Caching

TODO:

* [x] Make `__cacheit` the same for all Python versions (which uses the same try/except for all Pythons), and either use `lru_cache` from standard library, or our backport.
* [x] Merge #7674 and then merge this PR with master
* [x] Make all the tests pass


I was recently bit by the caching mechanism in Sympy which grew without bounds and crashed my machine repeatedly (i.e. https://github.com/sympy/sympy/issues/6321).  While this could have been avoided with calls to clear_cache, this only became clear after several days of digging around.  In general, the default behavior should probably be to not eat all of my memory.  I've attempted to solve this with a new caching mechanism based on weakrefs and fixed length deques.  I've tested this on my machine (Python 3.4) and it appears to work well (i.e. similar performance and no memory gobbling).  

The implementation involves both a WeakKeyDictionary and a WeakValueDictionary since we cannot create weakrefs to most of our function arguments or return values.  This dicts are tied together with a dummy object for which the only strong reference is in the deque.  Once the dummy object gets pushed out of the deque, the items are deleted from both dicts..  

I'm not to sure about the optimal size for the deque.  I've set it to 2000 without any adverse effects.