Updated unit tests with more coverage to track down issues in SPC-787.
Optimised collapse functions inside VertexHopGraphProvider so that
collapsing groups no longer causes unnecessary slowdowns.