[tor-commits] [tor/master] checkIncludes.py: extract topological sort code