generate_packets.py: move get_packet_functional_capability() into PacketsDefinition
Part of #45166. Turn the get_packet_functional_capability() function into a PacketsDefinition.code_packet_functional_capability property.
Part of #45166. Turn the get_packet_functional_capability() function into a PacketsDefinition.code_packet_functional_capability property.