bpo-17005: Move topological sort functionality to its own module (GH-20558)


The topological sort functionality that was introduced initially in the
functools module has been moved to a new graphlib module to
better accommodate the new tools and keep the original scope of the
functools module.
(cherry picked from commit 2f172d8f1525defe9bba4d49e967fdfc69151731)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
10 files changed