use QMainWindow.closeEvent for close events

The current code uses the QWidget.destroyed signal
to emit a close event into matplotlib. This is a very
bad idea, as it is a heavy abuse of Qt functionality.

When a main window is closed in Qt, it and its children
are deleted if the DeleteOnClose flag is set (which we
did set). This causes the QWidget.destroyed signal to be
called. Setting the DeleteOnClose flag is a very bad
idea, since objects should only be deleted by the
garbage collector. Soon after, PyQt4 will complain
that "the underlying C++ object has been deleted", since
the object is alive for python but dead for C++.

This patch changes the machinery to use the
QMainWindow.closeEvent to emit a close_event, which is
what one actually wants.
Make `rc_context` available via pyplot interface
make rc_context show up in pyplot's docs
BUG: Qt canvas didn't fire resize_event.
adding Ada Lovelace's public domain portrait

Original watercolor portrait by Alfred Edward Chalon, woodcut-style
graphic by Colin Adams for the Ada Initiative, SVG conversion by Fred
the Oyster, and colorization by Kaldari, under CC0 1.0 Universal Public
Domain Dedication, from Wikimedia Commons

http://commons.wikimedia.org/wiki/File:Ada_Lovelace_color.svg
adding Grace Murray Hopper's photo

20 January 1984
Source  U.S. Naval Historical Center Online Library Photograph NH
96919-KN (jpg)
Photographer: James S. Davis

License: All information on this site is in the public domain and may be
distributed or copied unless otherwise specified. Use of appropriate
byline/photo/image credits is requested.

This file is a work of a sailor or employee of the U.S. Navy, taken or
made during the course of the person's official duties. As a work of the
U.S. federal government, the image is in the public domain.

http://en.wikipedia.org/wiki/File:Grace_Hopper.jpg
use Ada Lovelace's and Grace Hopper's images
do not convert None labels to 'None'
do not convert None labels to 'None' (now in container.py)
Legend: Also calc the bbox of the legend when the frame is not drawn. This fixes gh1586
removed the import new in favor of import types for all versions.

types is supported from 2.2 and new is deprecated as of 2.6.

This is the only place `import new` appears in the code.
Fixes #1650 where using a file-like object on Python 3 fails.  Use npy_PyFile_* compatibility methods instead of rolling it ourselves.
Merge pull request #1599 from ivanov/ada-grace

 Ada Lovelace and Grace Murray Hopper images in place of Lena
Clear exceptions if PyFile_Dup() fails -- we have a way to handle "non-real" file objects.
Copy over some of the Numpy file-handing compatibility functions.
Update backend_agg to use the Numpy file-handling compatibility functions.
Open files in binary mode.
Fix #570 - Reversing a 3d axis should now work properly.
removed deprecated methods from the axes module. Added some DeprecatedWarnings in places where there should have been some
Use the new matplotlib deprecation warning