Fixed bug where deleted children of Boxes weren't deselected.

In the course of doing this I introduced a new Behaviour class and an OrphanRemover behaviour, which removes nodes from a set when they lose their parent. We have several other candidates for behaviours (min/max plug constraints, input generator, etc) so we'll be fleshing out the Behaviours namespace over time.

Fixes #430.
Fixed bug where pinned nodes were still visible in the UI after being deleted.

Fixes #308.
Added todo.
Merge pull request #431 from johnhaddon/hideDeletedNodes

Bug fixes for hiding deleted nodes