Merge all of thing.py (old upgrade stuff) into libup-ng
Some copy/paste, a lot of refactoring though. All the upgrade stuff is
now generalized as well, and less hardocded stuff for PHPCS.
Start adding type annotations for mypy, though we're not there yet.
Change-Id: I2a9128740efc9db401b644f078ca1d153e76b14f