gpush/gpick: revamp querying value of HEAD
don't invoke git symbolic-ref on-demand, but just load it up in-process
in load_state(), which is a lot cheaper. in conjunction with the local
branch heads which we already loaded up, we can simplify quite some code
at no runtime cost.
this also fixes the corner case of _parse_local_rev_sym() returning the
tip of the wrong branch for a plain HEAD revspec when the $from revspec
refers to another branch than HEAD does.
Change-Id: Iffcb153f5888293c7df7a62dc692bb6196b18c93
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>