use node_id typedef throughout

add some documentation
change node list to node map for faster access

If it's still too slow I can change it to a vector of nodes, but this is
easier and more flexible.

note:  In breadth first search I use the node id as an array index.
This can be dangerous if I ever add functionality to delete nodes.
change name edge_ to next_edge_
the nodes now maintain a list of the out edges

I had to change the way BreadthFirstSearch iterated over the edges.
It's actually a bit uglier now, but I think safer and more general.
count the number of edges seen

this is a cleaner way than using the bool start_

also count the number of nodes seen