Use postponed evaluation of annotations everywhere
This MR adds from __future__ import annotations
to all modules that use typing to enable use of the cleaner type annotations syntax supported by postponed evaluation.
The future import can be removed when Python 3.11 is the oldest-supported version.