added revertVisited function for setting visited = 0, to be used after search och other iterators.