Refactor the database schema for performance.

To use only the pages table to determine the next title to be processed,
store the latest claim (hash, timestamp and number of tries) and latest
score for each page.
Then, to get the next title query for the one with the highest score that
doesn't have its latest claim hash equal to the client's hash, except if 10min
have passed (in case of crashing clients).
Also:
- Add a direct reference to the latest result (in addition to the one to the
latest stat) to pages instead of going through claims.
- Remove claims table as it's no longer needed.
- Use (page id, commit hash) as the primary keys for results and stats, as
it allows using INSERT ... ON DUPLICATE KEY to avoid (improbable)
collisions.
- Clean up the code.
- Update the documentation.

Bug: 44652
Change-Id: I5800c99ce2d89c2984ed5376483cdf450f4333fe