Brandes algorithm tests for all core semirings. Fixed a bug in AllPathsFirstSteps