Fix lots of type errors
Mostly by hiding them. The one for pagepile.load_pagepile (declared to
only accept int, we passed strings from the request into it) was
legitimate, so declare it to accept str|int and stringify the argument.
Most of these errors are already fixed on Flask master
(pallets/flask#4109 ), but haven’t made it into a release yet.
Hopefully I’ll remember to remove the type: ignore comments later.