Add resize on collapse feature.

Currently, when you collapse the nodes, the tree does not shrink to fit the new space requirements; it stays the same size as when the panel is fully extended. For small trees, this isn't a problem. For large ones, it should shrink to allow more data onto the page/so you can see the timeline view

This PR resizes the height of the tree svg when a user collapses a node to avoid big white space. This is an option and the default is the current behavior (no resize).