This also pins the Twisted version in the mypy job for CI until proper type hints are fixed throughout Synapse.