git: Full length SHA-1 in, full length SHA-1 out.

This removes ambiguity at the expense of slight backward incompatibility.
git: Remove unnecessary return code checking.

The functions either return rc=0 or call fail_json themselves.
git: Make function get_remote_head usable when cloning.

This allows the module to return the before/after revisions in all cases.
git: Always return the before/after revisions, even in check mode.

The return values from check mode and non-check mode should match in all cases,
except when a SHA-1 hash is used as version, as there is no way to check if it
is a valid hash using `git ls-remote`.

Also, to accomodate this change, the force flag for the reset function has been
removed so that we can do the checking in main.
git: Handle network problem when running `git ls-remote`.
git: Don't add --branch while cloning if the version is a SHA-1 hash.
Merge pull request #4539 from sayap/git-sha1

git: Always return the before/after revisions, even in check mode.