re-generate legend: fixes

Fixed crash if there was no previous legend.
Fixed ncol inheritance.
pep8 compliance

Ran pep8.py 1.5.6 (https://github.com/jcrocholl/pep8) over the code.
Fixed all complaints.
figureoptions.py is now pep8 compliant

*/matplotlib/backends/qt4_editor/figureoptions.py
now passes pep8 checks.
hand merge