Re-Generate legend, through apply_callback/Apply

If there is a legend, it is re-generated when "Apply" is clicked.
See Issue #2934:
Might have side effects.
matplotlib#2934
tacaswell: "However this will clobber any legend that is not the auto-magically generated one so it should probably also get a tick box to enable/disable the updating of the legend."
Tick box not included.
Added a checkbox for (re-)generating auto-legend

Checkbox added that controls if an automatic legend is re-generated, or generated for the first time.
This checkbox defaults to False, as it generates a simple legend when set to True, see matplotlib.pyplot.legend(), which clobbers any carefully handcrafted legend.
re-generate legend: re-use: ncol and draggable

Copy some properties from the old legend to the new (re-)generated legend.
If the old legend was draggable, the new one is now also.
The number of columns in the legend is passed on from to old legend to the new legend.
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.
Merge pull request #2947 from anykraus/debug

Re-Generate legend, through apply_callback/Apply