add path.get_ipython_cache_dir to retrieve a cache directory
use cache directory for cython files

closes #3009