Added weakkeydict
WeakRef dictionary by itself is essentially the same as no cache. Added
a fixed length deque to keep track of some keys
most of the key,value pairs we want to cache are not weak-referenceable,
get around this limitation by using both weakkey and weakvalue dicts
fixed typo in return statement
Implemented Python 3 functools.lru_cache as a class decorator compatible
with py2 and 3
Removed locks and some if statements to improve performance
add variable size to lru_cache through environment variable SYMPY_CACHE_SIZE
cache_debug now appropriately handles SYMPY_CACHE_SIZE
Various items listed as autoclass which should be autofunction
LRU style caching.

Makes use of functools.lru_cache when possible otherwise backport
of lru_cache from
http://code.activestate.com/recipes/578078-py26-and-py30-backport-of-python-33s-lru-cache/.
Merge remote-tracking branch 'refs/remotes/upstream/master'
Cleanup
Cleanup
Merge branch 'lrubackport'
Merge remote-tracking branch 'upstream/master'
Merge branch 'sympy'
Merge branch 'sympy'
Use copy instead of deepcopy

Deepcopy should not be used (see #7672).
Check sys.version_info and then import functools.lru_cache if
appropriate.  3.2 has an lru_cache with an incompatible API so we can't
just try to import and then catch the ImportError.
Moved try/except out of make_key for backported lru_cache allowing one
consistent definition of __cacheit
Merge branch 'sympy'