Tech Support said to check out FindClusters (really neat). It works for this example whose output correctly groups the arcs into the associated subpaths:
L = {{1, 2}, {3, 4}, {2, 1}, {4, 5}, {9, 10}, {5, 8}};
FindClusters[L, DistanceFunction -> (Abs[Last@#1 - First@#2] &)]
{{{1, 2}, {2, 1}}, {{3, 4}, {4, 5}, {5, 8}}, {{9, 10}}}
Unfortunately, it fails for this example that puts all arcs into one list:
L = {{1, 2}, {3, 4}, {2, 1}, {4, 5}, {7, 8}, {5, 6}, {8, 9}, {11, 12}, {12, 13}, {13, 14}, {16, 17}, {30, 50}};
FindClusters[L, DistanceFunction -> (Abs[Last@#1 - First@#2] &)]
{{{1, 2}, {3, 4}, {2, 1}, {4, 5}, {7, 8}, {5, 6}, {8, 9}, {11, 12}, {12, 13}, {13, 14}, {16, 17}, {30, 50}}}
How could DistanceFunction be modified to correctly handle both examples?