tg.sh: use --no-deref when returning to a detached HEAD
When tg update gained the ability to return to arbitrary HEADs,
including detached ones, checkout_symref_full gained that same
ability to support the operation.
Unfortunately it failed to add --no-deref when setting the
HEAD ref and if that HEAD happened to be a symbolic ref then
the destination ref would end up getting stepped on instead
of making HEAD detached at the target revision.
The bug would only trigger if a fresh tg update (i.e. not a
--continue) was run when HEAD was already detached and the
update operation left HEAD attached at the time it was ready
to return to the original value.
Fix this by adding the necessary --no-deref when checking out
a detached HEAD (i.e. a hash instead of a ref name).
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>