Various util module type annotations
These are some things that came out of typing the config module a few years ago, but couldn't be used because it wasn't supported on py36. I'm sick of floating these along as work on top of these get perfected. The cowdict
changes are held back for now, because py38 doesn't support generic hints on the dict
superclass.