Fix bug when counting number of visited nodes

A bug was introduced when improving performance in commit ee8722c509
Each visited nodes could potentially be calculated more than once.
This is now fixed, using a class, VisitedNodes, to handle the counting.
A test is added to check the results from NetworkSummary.
Updated version to 0.8.2