structs: Migrate from namedtuple to dataclass

This lets us do some typing for the attributes, and specify the default
values in a much more user-friendly way.

This can be done now since we’re on Python 3.7!
2 jobs for typing in 19 seconds
Status Job ID Name Coverage
  Test
failed #16473
run-test

00:00:19

 
  Build
skipped #16474
run-build
 
Name Stage Failure
failed
run-test Test
  File "/home/gitlab-runner/builds/c0eaa480/0/linkmauve/python-nbxmpp/nbxmpp/dispatcher.py", line 188, in _register_modules
self.register_handler(*handler)
TypeError: register_handler() argument after * must be an iterable, not StanzaHandler

----------------------------------------------------------------------
Ran 32 tests in 0.331s

FAILED (errors=15)
ERROR: Job failed: exit status 1