Fix git_repository_message docs

This clarifies the docs for git_repository_message and also adds
to the tests to explicitly check NUL termination of data when the
output buffer is smaller than the message size.  There is a minor
behavior change so that a non-NULL output buffer will always be
NUL terminated (at length zero) if an error occurs.
Merge pull request #1563 from arrbee/doc-fix-repo-message

Fix git_repository_message docs