Migrate action module to dataclasses
This lets us get rid of a lot of boilerplate constructors and eq/repr
implementations. Assertions in constructors can move into post_init.
We need a # type: ignore comment on CategoryAction because mypy gets
a bit confused by the combination of ABC and dataclasses, but it’s not