Add rich comparison for Node and make them hashable.
This is to make multiple nodes of graph instances loaded
from JSON files work together.