Build: release.mk: don't output git errors when setting release variables
... in case we're not in a git checkout. Also, add a CHECKOUT variable to know
when we're in a git checkout, replace the LAST_FINAL variable with a reasonable
default for VERSION, and improve comments and formatting.