move caching into gmpy_cffi/cache.py