internal/task: clean up tagging commit selection logic
internal/task: clean up tagging commit selection logic

Clean up after the change to read the branch head later. Also fix a bug:
in the version tasks, we want to know exactly what commit we're tagging,
so we pass in the expected commit, and AwaitCL returns that if no CL was
necessary. But here we want to tag the latest branch head if there's no
CL necessary. So we need a different Await function.

For golang/go#48523.

Change-Id: I97f92b22d4f29edeb52d06c311fddaa6596da0c2
Reviewed-on: https://go-review.googlesource.com/c/build/+/444116
Reviewed-by: Dmitri Shuralyov <d181b7fea0ec87c86ba5a890ab716db52498e3ba@google.com>
TryBot-Result: Gopher Robot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Reviewed-by: Dmitri Shuralyov <d181b7fea0ec87c86ba5a890ab716db52498e3ba@golang.org>
Auto-Submit: Heschi Kreinick <e89ab2b172855aa0ad01c40c4d8a3535a61ac68a@google.com>
Run-TryBot: Heschi Kreinick <e89ab2b172855aa0ad01c40c4d8a3535a61ac68a@google.com>

golang/build,golang/build,golang/build,golang/build