Defined some utility routines to create PersonIdents and Commits.
When testing its useful to be able to supply the PersonIdent
timestamp data in a more raw format so there are now constructors
for PersonIdent that will accept the 'parsed' format more readily.
Added hashCode and equals implementations to PersonIdent so that
two PersonIdents which are logically equivilent (same name, email
and time but ignore time zone) will actually be considered to be
equal to one another by most Java functions.
Added utility function commit() to the Commit class, making it
easier to construct a one-off commit. Its faster to recycle an
existing ObjectWriter (as the compressor and message digest objects
are reused) but that's not always convenient to do in unit tests.
When setting a tree on a Commit don't null out the treeId; instead
set it to the id of the tree, if it has one. If it doesn't have
one yet then it will still get set to null.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>