Find all connected components in graph