Upgrade mypy to v1.0 and use `typing.Self`
With the release of mypy 1.0, [PEP 673](https://peps.python.org/pep-0673/) is supported, meaning the bound `TypeVar` types used extensively in `kilter.protocol.messages` can be removed and replaced with `typing.Self`.
issue