Dependency node references

I've added a SubGraph base class for both reference and box, which contains all the correspondingInput()/enabledPlug() logic, and rederived both Box and Reference from it.