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
bash completion: history clear & trim handle flags
bash completion: fix flags for history w/o subcmd
added note for "what's new" section
another what's new note for history subcommands
sphinx uses double backticks, thanks @takluyver
don't use lazily-evaluated rc.ids in wait_for_idle

iterate through the keys directly,
which should avoid possible KeyError when engine state changes.

should fix occasionally failing tests on Shining Panda
DOC: cross reference reset and reset selective

The html links were previously not working, perhaps because the method
names changed
DOC: add a note in %profile about %prun
prun is a method, not a class

just trying to keep @takluyver happy ;)
Merge pull request #4572 from ivanov/magic-docs

DOC: %profile docstring should reference %prun
Merge pull request #4568 from minrk/wait-fix-again-keyerror

don't use lazily-evaluated rc.ids in wait_for_idle
Merge pull request #4542 from ivanov/history-clear

new `ipython history clear` subcommand

This new subcommand is equivalent to ipython history trim --HistoryTrim.keep=0, which is now supported (and also has a more convenient --keep alias)

This command comes with a fix to bash completion of flags for ipython history subcmd

also included is a tiny fix for nbconvert completion that was pointed out by @jakobgager in #4528

also included is a change to our utils.io.ask_yes_no function that allows for specifying the behavior of a KeyboardInterrupt.