Extract hpb::ExtensionRegistry, hpb::internal::{ExtensionMiniTableProvider, ExtensionIdentifer} to extension.h

PiperOrigin-RevId: 668643168
diff --git a/hpb/extension.cc b/hpb/extension.cc
new file mode 100644
index 0000000..8938062
--- /dev/null
+++ b/hpb/extension.cc
@@ -0,0 +1,20 @@
+// Protocol Buffers - Google's data interchange format
+// Copyright 2024 Google LLC.  All rights reserved.
+//
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file or at
+// https://developers.google.com/open-source/licenses/bsd
+
+#include "google/protobuf/hpb/extension.h"
+
+#include "upb/mini_table/extension_registry.h"
+
+namespace hpb {
+namespace internal {
+upb_ExtensionRegistry* GetUpbExtensions(
+    const ExtensionRegistry& extension_registry) {
+  return extension_registry.registry_;
+}
+
+}  // namespace internal
+}  // namespace hpb