Incorporate test-lib and minimal infrastructure

This is a copy of t/test-lib.sh support files from git.git, with an
additional support Makefile and the minimal (crude) changes to make it
work for me.

A bit of a hack, but it means that git.git hackers are familiar with
the infrastructure already.
Add a few simple tests

Adds tests for the simplest things we want to detect, each in
isolation.  Sure enough, it already uncovers a bug.
Ignore separator line between commits

We didn't have any code for the separating blank line between commits
in git-log output, so it showed up as a trailing blank line in the
diffs.  This would show a spurious change if the last commit was
reordered to another (not last) position, because the last commit does
not have this blank line.

Skip it during diff reading.  This seems a reasonable place since it
would also catch other separating blank lines within the diff (not
that we should ever get those), and fixes the problem.