New extension hierarchical_collapse

Rebased https://github.com/ipython-contrib/IPython-notebook-extensions/pull/24