public NodeState clear() {
        state.clear();
        children.clear();
        return compact();
    }
Clears both the internal state and child list, then compacts the tree from this node upwards.

@return The result of invoking {@link #compact} after the remove.
documentapi/src/main/java/com/yahoo/documentapi/messagebus/systemstate/rule/NodeState.java