Fix UPDATE.php's breakdown query failing.
More update.py performance improvements.

If a machine never runs a benchmark, the last known earliest run ID
would always be 0, resulting in a full scan of the database. Instead,
the most recent run ID for that machine is now cached.