Switch git_ref -> git_treeish

Rather than only refs, we want to be able to specify a commit SHA.
Therefore, rename git_ref to git_treeish and rejig script to do

    git checkout $GIT_TREEISH

rather than

    git checkout origin/$GIT_REF

(the former works for both branch names and commit SHAs).