Make Point2D hashable

This allows it to be used as the key in HashMaps and HashSets.