Minimal support for the update-ref-remote command

This is a initial version with very limited functionality, it only
supports being called in one of the forms. It doesn't yet supports
-d, --stdin or -z. And it doesn't support making "oldval" optional.

Making this into an independent commit anyway, since the following
changes are most likely going to be restricted to the built-in
command, and this version already works as a proof-of-complete.