[subset] Use set iterators when formatting input

Walk tag sets and sorted glyph-map keys through their native iterators
instead of repeatedly calling the public scalar set API.

Tests: meson test -C build (272/272)

Assisted-by: OpenAI Codex <codex@openai.com>
diff --git a/src/hb-subset-input.cc b/src/hb-subset-input.cc
index 117a45f..c3906fd 100644
--- a/src/hb-subset-input.cc
+++ b/src/hb-subset-input.cc
@@ -806,9 +806,8 @@
 static void
 _format_tag_set (const hb_set_t *set, hb_vector_t<char> &out)
 {
-  hb_codepoint_t tag = HB_SET_VALUE_INVALID;
   bool first_tag = true;
-  while (hb_set_next (set, &tag))
+  for (hb_codepoint_t tag : *set)
   {
     if (!first_tag)
       out.push (',');
@@ -916,9 +915,8 @@
   hb_set_t keys;
   hb_map_keys (&glyph_map, &keys);
   hb_vector_t<char> pairs;
-  hb_codepoint_t key = HB_SET_VALUE_INVALID;
   bool first = true;
-  while (hb_set_next (&keys, &key))
+  for (hb_codepoint_t key : keys)
   {
     if (!first)
       pairs.push (',');