This is relevant when all commits are equal by tree, but seem changed
due to the added GitButler headers.
For added safety, we also compare by commit message, date and authors,
basically everything that isn't the headers.
That way, the head is static which allows to re-use the worktree status across
multiple related calls.
Also, add a way to quickly get the `head_commit()` from a `git2::Repository`.
Note that this may cause breakage in the app, as now it will see the actual
head, not a computed one, but that should also help us to find places that
didn't properly update their state.