works with qt as well

Detects ipython html notebook using parent_appname from ipython config.
If it is not the notebook (including the qt console), the progressbar
will write to sys.stderr (or the specified fd)