Test for #2727 (%run -m doesn't support relative imports)

test_run_submodule_with_relative_import fails.
Refactor part for "%run -t"
Support relative import in "%run -m"
Add a failing test for "%run -p -m ..."
Support relative import in "%run -p -m"
Add a failing test for "%run -d -m ..."
Support relative import in "%run -d -m"
Refactor part for "%run -d"
Fix ChangedPyFileTest.test_changing_py_file failure
Use list comprehension instead of filter+lambda
Add ExecutionMagics._run_with_profiler
Refactor ExecutionMagics._run_with_profiler
Rename ExecutionMagics._run_with_profiler argument
Document ExecutionMagics._run_with_profiler
Use UsageError for non-local exit + error message
Comment on "opts.merge" in _run_with_profiler
Fix %run usage line; mention -m and -e
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.