Add failing test for gh-3547
Simplify caching of modules from %run-ing scripts.

Previously, we cleared and re-used a single FakeModule instance in which to
run cells, and cached copies of the modules' namespaces to prevent them from
being cleared. Now, we cache one FakeModule instance per script file, clearing
it and re-using it if the same script is re-run. This seems more robust.

Closes gh-3547
Another passing test :-)
Minor tweak to test for Python 3
Mention API changes in whatsnew doc
Update docstring of new_main_mod() method
Merge pull request #3555 from takluyver/i3547

Simplify caching of modules with %run.

Previously, we cleared and re-used a single FakeModule instance in which to run scripts, and cached copies of the modules' namespaces to prevent them from being cleared. Now, we cache one FakeModule instance per script file, clearing it and re-using it if the same script is re-run.

Closes #3547, and fixes another test that was marked as a known failure.