[webgpu][headers] Fixes missing FreeMember code-gen.

- Change in https://dawn-review.googlesource.com/c/dawn/+/247536
  removed FreeMembers functions from ['functions'] in generation,
  as a result, the native procs weren't generating them anymore.
  This fixes the issue by updating the templates to use the new
  helper introduced in that CL to generate the functions.
- The issue was seen and was reproduceable via the comment chain
  here:
  https://dawn-review.googlesource.com/c/dawn/+/247536/comments/c880bbce_f697f33a

Change-Id: Ieaef38ac0108217e61bfb071f09865ab133b3ca8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/247976
Auto-Submit: Loko Kung <lokokung@google.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
diff --git a/generator/templates/dawn/native/api_dawn_native_proc.cpp b/generator/templates/dawn/native/api_dawn_native_proc.cpp
index e399cd6..9ce12dd 100644
--- a/generator/templates/dawn/native/api_dawn_native_proc.cpp
+++ b/generator/templates/dawn/native/api_dawn_native_proc.cpp
@@ -38,8 +38,8 @@
         {%- endfor -%}
     );
 {% endfor %}
-{% for type in by_category["object"] %}
-    {% for method in c_methods(type) %}
+{% for (type, methods) in c_methods_sorted_by_parent %}
+    {% for method in methods %}
         extern {{as_cType(method.return_type.name)}} Native{{as_MethodSuffix(type.name, method.name)}}(
             {{-as_cType(type.name)}} cSelf
             {%- for arg in method.arguments -%}
@@ -68,8 +68,8 @@
         }
     {% endfor %}
 
-    {% for type in by_category["object"] %}
-        {% for method in c_methods(type) %}
+    {% for (type, methods) in c_methods_sorted_by_parent %}
+        {% for method in methods %}
             {{as_cType(method.return_type.name)}} {{metadata.namespace}}{{as_MethodSuffix(type.name, method.name)}}(
                 {{-as_cType(type.name)}} cSelf
                 {%- for arg in method.arguments -%}