Backport PR #5505: Make backport_pr work on Python 3

This turned out to be pretty easy.
Backport PR #5506: Fix ipconfig regex pattern

As suggested by @andjoely. Should be tested by Windows users without netifaces installed.

Closes gh-5491
Backport PR #5527: Don't remove upload items from nav tree unless explicitly requested.

closes #5518
Backport PR #5546: do not shutdown notebook if 'n' is part of answer

this prevents commands like 'yesn' to shut down the notebook server
Backport PR #5548: FileNotebookManager: Use shutil.move() instead of os.rename()

`os.rename()` fails in case the new path is on a different
filesystem. For example if a file in `/tmp` is tried to save
to home, it causes following error:

[Errno 18] Invalid cross-device link using os.rename
Backport PR #5554: Make HasTraits pickleable

The main change is storing method names instead of functions in `_trait_dyn_inits`. These functions were failing to pickle.
Backport PR #5576: only process cr if it's found

because re.sub is crazy slow.

I found [a notebook](https://github.com/pysal/pPysal/blob/master/weights/two_stage.ipynb) that takes about a minute to render in master, and 2s with this PR.

I think this is why nbviewer is still having issues, so I think we should merge this ASAP.
Backport PR #5582: reset readline after running PYTHONSTARTUP

should avoid conflicts between IPython and Python completion setup

Many folks have completion setup in PYTHONSTARTUP for the plain Python REPL. In IPython 1.x, this wasn't an issue because IPython reset the readline state after every execution. This was removed in 2.0 (#4353), allowing users to customize readline behavior. One effect of this is allowing PYTHONSTARTUP to customize *IPython's* readline behavior, which seems to be something nobody wants.

This PR simply re-applies the old reset readline behavior after running PYTHONSTARTUP.

closes #5514
Backport PR #5630: Fixed Issue #4012 Added Help menubar link to Github markdown doc

Closes https://github.com/ipython/ipython/issues/4012
Backport PR #5633: Provide more help if lessc is not found.

A slightly more useful error message.

I used a ValueError to match the other exceptions, but I think OSError might be a more appropriate exception.

Addresses: https://github.com/ipython/ipython/issues/5632