Refactor IPython notebook export

This change makes use of the existing ``split_code_and_text_blocks`` in ``plot2rst``.