Dynamic color plug promotion fix

This fixes a bug which made it impossible to reload a script in which a dynamic colour plug had been promoted to box level.

It also adds a prune() method to RecursiveChildIterator and FilteredRecursiveChildIterator which makes it easy to skip recursion at chosen points in the iteration.