Adds equals method to node

Allows to compare two trees. Will be useful in order to know if change have been done in the tree (and so if the trace should be updated).