Backport PR #4193: Update for #3549: Append Firefox overflow-x fix

Firefox seems to require an additional "url-prefix()" for #3549 to work.
Backport PR #4183: ESC should be handled by CM if tooltip is not on

This PR fixes an issue on a key-press event with ESC  in code cells, allowing the event to propagate to CM if tooltip is not on.

Currently, key-pressing ESC in a code cell simply removes tooltip, and the event is ignored by CM.   I can not get out of insert mode when I am using Vim key binding.
Backport PR #4201: HeadingCells cannot be split or merged

Merging with heading cells can lose data, and never makes sense.

Closes #4200.
Backport PR #4205: use TextIOWrapper when communicating with pandoc subprocess

uses 'universal-newline' mode, to avoid any confusion with CRLF.

closes #4122
closes #3819

alternative to #4202
Backport PR #4213: fixed dead link in examples/notebooks readme to Part 3

When the title and link for Part 3 were updated, the readme was not updated.
Backport PR #4214: engine ID metadata should be unicode, not bytes

fixes `TypeError: b'f5b984b0-fd8c-4873-a23e-658425c1e28a' is not JSON serializable` when an engine dies while working on a task in Python 3.

candidate for backport to 1.2
Backport PR #4217: avoid importing numpy at the module level

in utils.pickleutil

With this change, numpy is not in sys.modules at kernel startup.
Backport PR #4218: Fix display of SyntaxError when .py file is modified

As described on the mailing list, the line displayed with a SyntaxError can be incorrect, when editing and rerunning a file, due to stale caching. The line appears to be retrieved from the cache when the SyntaxError is created, which we can't influence, but we can replace it before we display the error, which is what this does.
Backport PR #4230: Switch correctly to the user's default matplotlib backend after inline.

If '%matplotlib inline' was called first, we'd incorrectly revert to
inline when plain '%matplotlib' was called, instead of loading the
user's default GUI.  If the user called '%matplotlib' first (without
'inline') it worked correctly, but not in the other order.

The fix is to read the backend from the original defaults, not from
the runtime data structure.
Backport PR #4232: no highlight if no language specified

This matches behavior of places like GitHub, where if you do not specify a language, e.g.

    ```
    no_highlighting("here")
    ```

There is no syntax highlighting. You must do

    ```python
    def foo(a="hi"):
        return 5
    ```

to enable highlighting in a particular language.

With configuration as it is right now in IPython, it is impossible to disable syntax highlighting in markdown blocks.
Backport PR #4453: Play nice with App Nap

Ships @minrk/appnope in `IPython.external`, which uses ctypes to make the appropriate NSProcessInfo calls.

It does not disable App Nap outright, rather making the appropriate context manager calls to disable it only around the critical block.  The important change is that `QSocketNotifier` is used to trigger event handling in the kernel, rather than a Timer, which should never have been used.

should close #4431
Backport PR #4488: fix typo in message spec doc

complete_reply have a `matched_text` and not a `text` field.

Fixes  #4485.

Should we backport doc fixes on 1.x ?
Backport PR #4639: Minor import fix to get qtconsole with --pylab=qt working

Running the qtconsole with --pylab=qt on non-OSX-10.9 OSes fails with
the error `TypeError: 'NoOpContext' object is not callable`.
Backport PR #4722: allow purging local results as long as they are not outstanding

raise RuntimeError, not assert

closes #4721
Backport PR #4738: don't inject help into user_ns

because it's in builtins. I presume this was for old Pythons, but it doesn't seem necessary for ≥ 2.7.

Prompted because the injection fails on 3.4, causing the warning:

    WARNING: help() not available - check site.py

but help actually works just fine.