Fix all broken unit and Phan tests
I can't tell why the integration test did *not* broke before, but I can
explain why it broke *now*. All tests use the same page. The test directly
above the failing one moves the page and turns it into a redirect. The
next test deletes and restores this redirect, but did not expected to deal
with a redirect.
There are many ways to fix this, e.g. use random page names for each test.
I decided to go with the most minimal hack I could think of and marked the
tests to be run in a specific order.
The CacheInvalidator test broke because of the change made in I2ec99a1
(T221368) just a few days ago. Since then, the Title is not the same
object any more, but always a new Title object. I believe this is not an
issue, as long as the two titles are equal.
The type hints are partly duplicated from Idf24d1d. We can as well
force-merge Idf24d1d instead.