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.