Cleaning up function reflection attrs. (#9648)

This makes the attr queries consistent with the other API methods and
removes "reflection" from the name. Also plumbs through module attrs and
enables support for unit attrs (empty values).

Fixes #1979.
diff --git a/runtime/bindings/python/vm.cc b/runtime/bindings/python/vm.cc
index 440732b..ecd4a27 100644
--- a/runtime/bindings/python/vm.cc
+++ b/runtime/bindings/python/vm.cc
@@ -41,17 +41,16 @@
 
 py::dict GetFunctionReflectionDict(iree_vm_function_t& f) {
   py::dict attrs;
-  for (int i = 0;; ++i) {
-    iree_string_view_t key;
-    iree_string_view_t value;
-    auto status = iree_vm_get_function_reflection_attr(f, i, &key, &value);
-    if (iree_status_is_not_found(status)) {
+  for (iree_host_size_t i = 0;; ++i) {
+    iree_string_pair_t attr;
+    auto status = iree_vm_function_get_attr(f, i, &attr);
+    if (iree_status_is_out_of_range(status)) {
       iree_status_ignore(status);
       break;
     }
     CheckApiStatus(status, "Error getting reflection attr");
-    py::str key_str(key.data, key.size);
-    py::str value_str(value.data, value.size);
+    py::str key_str(attr.key.data, attr.key.size);
+    py::str value_str(attr.value.data, attr.value.size);
     attrs[std::move(key_str)] = std::move(value_str);
   }
   return attrs;