Adjacency list rather than edge list, and construction of dag on SCCs.

The function is made to accept an adjacency list rather than an edge list (which used to be subsequently transformed to an adjacency list). In addition, the dag on the SCCs is extracted while finding the SCCs.