git_tests: Refactor the base classes of tests.
utils: Add a new function: nonempty_lines().
git: Add a new method to Repo: get_unmerged_commits().