Don't reset the readline completer after each prompt

This makes it impossible to setup a custom completer. The comment says that
"we must ensure that our completer is back in place," but I don't see why. All
that does it make it impossible to use a different completer. One can trick
IPython into not doing this by monkeypatching ip.has_readline to False, but
then certain features like multiline editing are no longer enabled.

See https://github.com/davidhalter/jedi/pull/321.
Use svg by default due to lack of Ghostscript by default on Windows
add utils.darwin.disable_app_nap

disables the App Nap energy saving behavior of OS X 10.9.
Requires PyObjC, which is included in System Python,
but not in many other Python installations.

It is pip-installable, but takes ages to compile.

should close #4431
add appnope to external
use QSocketNotifier, not poll

avoids having to disable App Nap outright.

Also use appnope context manager to disable App Nap on OS X 10.9 while processing events.

Adds IPKernel._darwin_app_nap flag, so that working with App Nap can be disabled, in case appnope causes problems for some.

App Nap is just disabled outright on wx.
Add strip_url_static_file_prefix to filters
Add strip_url_static_file to base sphinx template and templateexporter.py
Add tests for filter
`strip_files_prefix` now also strips markdown style links, `latex_base` updated to include filter
fix history trim backup flag doc
add --keep alias for history trim
fix nbconvert completion

thanks @jakobgager for pointing this out in #4528
add note about the 1000 / --keep variable
bash completion: proper history completion
custom keyboard interrupt handling in  ask_yes_no

Sometimes, Ctrl-C just makes sense as an answer, and re-asking the
question is just frustrating. This changes makes it possible to break
out of the asking loop via Ctrl-C. This is particularly handy for asking
questions from the command line, where one expects Ctrl-c to be a sort
of "Cancel" operation, and is often functionally equivalent to "no"
allow trimming to an empty database (--keep=0)
`ipython history clear` subcommand
relax ipconfig matching on Windows

looser match via regular expression, doesn't make English assumptions.
don't include 127.0.0.1 in load_ips_ipconfig
bash completion: history clear & trim handle flags