Shifted to own implementations

Added, and lightly tested min cost flow (cycle cancelling), hierholzer's
algorithm (euler tour finding), and all pairs shortest paths (floyd
warshall).