WIP: ipython: fix qtconsole and --pylab modes

They currently fail to load because of missing modules. Fix that so that
we can run:
  ipython qtconsole
  ipython --pylab

Also add jinja2 as dependency; ipython uses it in the notebook mode.