Implement Commits class for reusing much of similar code shared between
existing rake tasks.

It only works for by_lines_changed for now.
Implement Commits#smallest

This is used by task :smallest_group_by_lines_changed which additionally
reports the number of commits by lines changed in the smallest section
of patches (between 1 and 20 lines changed).