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.
Add comment as per PR discussion, indicating MPL 1.1 is now required.
Add information to what's new about new MPL 1.1 requirement.
more informative error message for bad serialization
check that the unpacked test object is correct
test invalid Session pack and unpack
Merge pull request #4239 from minrk/better-errors-for-aaron

more informative error message for bad serialization
Hopefully fix ordering of output on ShiningPanda
Merge pull request #4271 from takluyver/piped-tests-headings

Hopefully fix ordering of output on ShiningPanda
Merge pull request #4230 from fperez/mpl-backends

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.

Requires matplotlib 1.1
Merge branch 'master' of https://github.com/ipython/ipython