Unoptomized implementation of Kosaraju's algorithm

scc function is extremely slow on large graphs because of the append
operations.

Both iterations of DFS could be sped up by removing recursion.