add qt config option to clear_on_kernel_restart

Previously, restarting a kernel in the qtconsole always cleared the
entire session. Since qtconsole has a %clear command, it makes sense to
allow users to decouple the two activities - the restarting of kernels,
and clearing the console.  This commit adds a configuration option which
allows for the restarting of kernels without losing console history. The
default value for clear_on_kernel_restart is set to True to stay
consistent with the way things worked before this functionality was
added.

To test, run:

    ipython qtconsole --IPythonWidget.clear_on_kernel_restart=False

Here's what it looks like when the user restarts the kernel on In[3]:

 Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
 Type "copyright", "credits" or "license" for more information.

 IPython 0.13.dev -- An enhanced Interactive Python.
 ?         -> Introduction and overview of IPython's features.
 %quickref -> Quick reference.
 help      -> Python's own help system.
 object?   -> Details about 'object', use 'object??' for extra details.
 %guiref   -> A brief reference about the graphical user interface.

 In [1]: 0x42
 Out[1]: 66

 In [2]: 042
 Out[2]: 34

 In [3]: # restarting kernel...
 #------------------------------------------
 In [1]:
use html <hr> instead of ascii one
terminate kernel after embed_kernel tests
add HistoryManager to class list

So it will be included in generated ipython_config.py and `--help-all` output.
move clear_on_kernel_restart back inside reset()

I originally made a new method (reset_on_restart) to accommodate this
new functionality, but it turns out I ended up needing to replicate
almost everything that reset() already does inside this new method. In
particular, reset_on_restart did not work properly when restarting a
kernel that was in debug mode.

Everything should now work, and we don't have another method to deal
with.
rename reset parameter to 'clear' for clarity
Merge pull request #1737 from minrk/histcfg

add HistoryManager to ipapp class list
Merge pull request #1727 from minrk/embedtest

terminate kernel after embed_kernel tests

The kernels could be left running after the tests.
Merge pull request #1681 from ivanov/optionally-clear-on-restart

add qt config option to clear_on_kernel_restart.

This allows for restarting kernels without clearing the qtconsole,
while leaving a visible indication that the kernel has restarted.
Fixed #735.  More useful error message in html output
Added a warning dialog box when attempting to convert a PNG to SVG (#735)
Improve warning about exporting SVG

 - Improved error message by instructing to regenerate the figure.
 - Only display warning message once per figure per export attempt.
Simplified the reset of the _svg_warning_displayed flag in RichIPythonWidget

By overriding export_html(), and reseting the flag prior to the html
export.

This avoids repeated messages for a single document save, but repeats the
message for subsequent saves, including in new tabs and across kernel
restarts.
Tidying of warning dialog strings

... and small expansion of related comments
Merge pull request #1449 from icmurray/master

Fix for bug #735 : Images missing from XML/SVG export