Make UnrebasedPRs command inherit from GitRepoCommand

- Reuse GitRepoCommand initialization and main repository initialization
- Only propagate arguments of interests to the subfunctions
- Move merge_base() as a low-level Git function of GitRepository
Add logic to parse comments from PRs with no notes
Add --rebased-to and --rebased-from comments in Rebase command
Add support for --no-rebase comment in UnrebasedPRs command

Automatically add --no-rebase comment to the UpdateSubmodules generated PR
Teach Unrebased PRs command to scan PR body first for rebase notes
Fix flake8 warnings
Add --no-rebase to submodule PR body instead of creating a comment
Add option to UnrebasedPRs to check mismatching PR comments

This commit construct PR dictionaries based on parsed PR body/comments when
listing unrebased PRs. Once the PRs are listed, the from/to rebased comments
are checked against the other branch dictionary and mismatching candidates are
output unless the --no-check is passed to the command.
Refactor static check() method to allow method unit testing

- Move output printing to the notes() method
- Add unit tests for UnrebasedPRs command
Handle multiple sources/targets while checking rebased PR comments

Dictionary returned from static check() method now stores expected values in
a list to support multiple targets/sources.
Fix broken key existence check
Handle --rebased comments with trailing whitespaces/comments
Use regular expressions to retrieve pull request numbers

- Use re.search when parsing git log
- Use re.match when parsing --rebased comments
- Add test with trailing period to TestUnrebasedPRs
Drop debugging line
Improve expected comment message (prefix with --rebased)
Return 2 mismatching dictionaries to allow examination of individual PRs

Update TestUnrebasedPRs unit tests to deal with the new output
Add logic to update mismatching PR dictionary for opened and rebased PRs

Once dictionaries have been checked and missing comments have been identified,
the dictionaries run through an update_dictionary() method which goes through
each of the unfound keys in the primary PR dictionary, checks wether the PR is
open and parses the body/comments for a rebase note
Also add a parse() method to PullRequest that parses the PR body first then
parses the comments if nothing is found.
Extend update_dictionary() to merged PRs

This commit should allow non first-parent merged PRs to be checked while
updating the rebase dictionary. It also checks the base of the PR matches the
branch.
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
Merge pull request #92 from sbesson/unrebasedpr_comment

Unrebased PRs improvement