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.
JS Configurablity Take 2

Change the way configurability works.
Config dict should be passed down to the parent class where it will be
merged with the default value and propagate to this only in the base
class.

This allow to both alter the configuration on a per instance basis, or
globaly by tempering with the class instance.

This also get rid of IPython global in some cases.
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
use hbox mixin instead of class

this will allow dynamic css in nbviewer like vbox-ing for low res
without JS or change in html
include hbox in outpuarea css
include vbox into .cell css definition
merge box-flex1 class into .output-area css definition
recompile css
better UsageError for cell magic with no body

closes #3179
backport If-Modified-Since fix from tornado

See facebook/tornado#713

closes #3177
clarify %%file docstring

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

see #3178
Notebook actually gets and holds ename, not etype
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