Refactor rebased PR linkcheck step in UnrebasedPRs command

- Encapsulate the linkcheck logic in check_links() method
- Recursively visit prs until all link pairs have been explored
- Convert static check() method into check_directed_links() and fix unit tests
- check_links() method returns combined mismatch dictionary