generate_packets.py: Move handle parameter declarations into type code
Part of #45206. Replace Field.get_handle_type() with a Field.get_handle_param() method, which calls a FieldType.get_code_handle_param() method that declares a parameter type as appropriate (including pass-by-reference handling for worklists).
Part of #45206. Replace Field.get_handle_type() with a Field.get_handle_param() method, which calls a FieldType.get_code_handle_param() method that declares a parameter type as appropriate (including pass-by-reference handling for worklists).