See issue #2471
This fixes get_remote_head() to be smarter about how to check remote
head. It checks if it is a remote branch or tag and then checks for the
remote object id associated with it. If it is sha1, get_remote_head()
returns it as-is since there doesn't appear to be a way to check a
remote repository for a specific object/sha1. is_remote_tag() is added
to help out the new functionalit in get_remote_head().
In main(), if check_mode is true and version is a sha1, the module now
checks to see if the object is present.