Fix pull-replication update head with Gerrit replica

I2211201f2 introduced the support for Gerrit replica
but all the tests were run against Gerrit primary with
the native REST-API, instead of using the pull-replication
plugin specific API executed through a filter.

The combination with Gerrit Issue 290794206 made
the bug invisible because all UpdateHeadActionIT tests
on replicas were still passing, because the underlying
Gerrit daemon was still a primary even if the test was
configured with container.replica = true.

Fix the implementation of the update head functionality
on Gerrit replicas and amend the validation tests for
making sure that it won't break again in the future.

Depends-On: https://gerrit-review.googlesource.com/c/gerrit/+/379199
Bug: Issue 290644998
Change-Id: I3af2d2a883ce948f421c9d51ca8d31eb5435c5ec
3 files changed