generate_packets.py: move top-level parsing into a new PacketsDefinition class
Part of #45166. Create the class mentioned there and move parsing into it. The class should:
Depends on #45165
Part of #45166. Create the class mentioned there and move parsing into it. The class should: