Use "git-rev-parse" to get the HEAD commit
Traditionally, HEAD was just a link to a refs file. Recently, however,
support for HEADs of the form "ref: " was added to git. In addition,
it's safer to verify the HEAD commit id before using it.
Change git.py to use "git-rev-parse" to derive the HEAD commit instead of
reading the HEAD link directly. If there are any problems with the HEAD
commit id, git.get_head() now raises an exception.
And, use "git-update-ref" to update the HEAD for similar reasons.
Signed-off-by: Chuck Lever <cel@netapp.com>