Reorganize graph functions and add BFS variant exploring all components
Created by: femtobit
This PR adds another BFS function (FullBreadthFirstSearch) which will explore all connected components in one call and pass information about the current component to the visitor function.
This could be useful for example for implementing #48 (closed) or similar graph functions so that they also work for graphs with multiple components.