Add basic test for tracking reviews

Tests creation of a tracking review, and a straight-forward rebase of it,
and also tests disabling and enabling of the tracking, and checks that the
tracking (and its status) is correctly reflected on the review front-page.

To make disabling/enabling easier, have the /submitreview operation return
the tracked branch id when creating a tracking review.
Make temporary references truly temporary

Some operations create temporary references (refs/temporary/$SHA1 or
refs/commit/$SHA1 traditionally,) for instance to be able to fetch a
specific commit into a temporary cloned repository.  These temporary
references were never cleaned up, making them more permanent than
temporary in practice.

This commit introduces the utility function Repository.temporaryref()
with acts as a context manager and returns a temporary reference name
that is deleted when the context manager's __exit__() is called.  Code
that used to create "temporary" references is modified to use this
instead.

Also, the utility function Repository.fetchTemporaryFromRemote() is
adjusted to also act as a context manager that returns the fetched SHA-1,
and also makes sure to clean up the temporary reference name it creates
in the context manager's __exit__().

The /fetchremotebranch operation, which is the only current user of
Repository.fetchTemporaryFromRemote(), is adjusted to add a permanent
keepalive reference to the fetched commits instead.  In practice, the
operation returns SHA-1s back to web front-end clients, that will later
supply them as arguments to /submitreview, so the commits need to be
referenced at least semi-persistently.  We don't have semi-persistently,
so make it fully persistently instead.  (It's likely the commits will be
used to create a review, in which case they can never be GC:ed anyway.)

Also add a migration script that deletes all existing refs/temporary/
and refs/commit/ references in every repository.
Pack keepalive refs into a single ref

Before running the nightly maintenance GC on each repository, pack all
"loose" keepalive refs (refs/keepalive/$SHA1) into a single keepalive
ref (refs/keepalive-chain), and delete all the loose keepalive refs.
This is done to reduce the total number of refs in the repository,
which improves the performance of various operations on it, and also
reduces network traffic when pushing to the repository.

The single keepalive ref will always point to a chain of "manufactured"
merge commits, that point to the empty tree, and whose parents will be
another such merge commit (or a root commit) and the commit we wish to
keep alive.

Also add a migration script that converts all existing refs/replays/*
refs into refs/keepalive/* commits, so that they are then packed and
deleted by this packing mechanism too.
Fix /rebasetrackingreview output for rebases that introduce changes

Due to a typo/copy-paste-error the "Has unexpected changes!" status
would never be reported; that case would say "Clean." instead.  Also,
there would be no link to a diff displaying the changes.

The outcome of the rebase was not affected, but this might cause users
to not notice invalid rebases before-hand when they could have if the
system had helped them out a little more.