Backport PR #4609: Fix bytes regex for Python 3.
Backport PR #4668: Make non-ASCII docstring unicode

We shouldn't have non-ascii characters in a bytes literal. This seems to be the source of problems for the docs build on ShiningPanda.

Merging straight away, just making a PR so there's a record of this.
make an ascii docstring

workaround bundled numpydoc issue
Backport PR #4868: Static path fixes

more use of the package dir instead of static file dir, and update a previous test patch of mine to work for build and install time tests
Backport PR #4909: sort dictionary keys before comparison, ordering is not guaranteed

failed for me on 1.x with

    nose.proxy.AssertionError: AssertionError: Lists differ: ['a', 'b'] != ['b', 'a']

(2to3 wraps a list around it)
Backport PR #4720: never use ssh multiplexer in tunnels

`ssh -f` is [broken in OpenSSH](https://bugzilla.mindrot.org/show_bug.cgi?id=1948) when a ControlMaster multiplexed connection is used.

`-S none` disables the multiplexed connection.

closes #4717
Backport PR #4748: fix race condition in profiledir creation.
Backport PR #4820: fix regex for cleaning old logs with ipcluster

It still had the 'z' suffix from ages and ages ago, so no files would ever match.

closes #4810
Backport PR #4840: Error in Session.send_raw()

Addresses issue ipython/ipython/#4839.

(This is my first pull request, and first contribution to ipython, so should be checked to make sure that my assumption about the problem is correct).
Backport PR #4903: use https for all embeds

YouTube, Vimeo, Scribd

I can't think of a reason not to, and http embeds won't work on https pages.
Backport PR #4908: lookup builtin docstrings rather than hardcoding
Replace set comprehension for 2.6 compatibility
Backport PR #4849: Various unicode fixes (mostly on Windows)

There were warnings on startup of IPython, and the qtconsole and notebook could not be started at all if the user's home directory is unicode.

Changes:

- add `prefer_stream=True` flag to utils.encoding.getdefaultencoding, since the right answer is different for stream output and other things.
- always encode args to Popen on Windows Python 2
- never add unicode to sys.path on Python 2

These should be backported for 1.2, and it would be great if some unicode-locale Windows users (@jstenar) could double check the sanity of the changes.
Backport PR #4928: user importlib.machinery when available
Add missing import of py3compat
Tiny comment fix
Correct backport of PR #4928