Key the root modules cache by sys.path entries.

Instead of a single root modules cache, cache in a dict the list of modules
associated with each sys.path entries (except $PWD).  On future import
completions, create the list of completions by merging the appropriate cache
entries (while updating the cache if sys.path changed) and adding in the
modules in $PWD as well.  This allows the completer to keep up with multiple
Python installations, virtualenvs, etc.

Right now the root modules cache grows indefinitely.  It may be worth
implementing a LRU cache, a la functools.lru_cache.
BUG: Fix the set and frozenset pretty printer to handle the empty case correctly.
improve config line magic

check for MissUpperCasing and add additional info
if there is a case insensitive match on clas

if line of the form

%config Class.value

return the value of the trait instead of just throwing bad usage
Added missing s
Merge pull request #3175 from rgbkrk/patch-1

Added missing s
better UsageError for cell magic with no body

closes #3179
clarify %%file docstring

there was a leftover mention of `-f`, which doesn't actually exist.

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

closes #3009
Merge pull request #3184 from juliantaylor/cython-cache

Cython cache
ENH: Add tests for set and frozenset pretty-printing.
ENH: Make the set pretty-printer sort the elements if possible, similar to dict keys.
Merge pull request #3180 from minrk/cellmagicmsg

better UsageError for cell magic with no body
Add new keycodes
Merge pull request #3163 from rkern/fix-empty-frozen-set-pretty

Fix the set and frozenset pretty printer to handle the empty case correctly
Improve special key handling in completer
set <select> width to auto
Even better docstrings for %%file

s/amend/append/
Merge pull request #3182 from minrk/file-docstring

Clarify %%file docstring; rename --amend to --append.
Merge pull request #2695 from anntzer/module-cache

Key the root modules cache by sys.path entries.

Instead of a single root modules cache, cache in a dict the list of modules
associated with each sys.path entries (except $PWD). On future import
completions, create the list of completions by merging the appropriate cache
entries (while updating the cache if sys.path changed) and adding in the
modules in $PWD as well. This allows the completer to keep up with multiple
Python installations, virtualenvs, etc.

Right now the root modules cache grows indefinitely. It may be worth
implementing an LRU cache, a la functools.lru_cache.

closes #2688