[git] Find the actual commit annotated tags refer to instead of the tag object.

When the git module version parameter is an annotated tag (all github tags tend to be annotated for example), it incorrectly gets the tag object id instead of the commit it points to in get_remote_head(). This results in check mode incorrectly reporting changed status and unnecessary work in real runs.

The proposed change fixes the issue by always finding the dereferenced tag from ls-remote for annotated tags while still handling lightweight tags.