Avoid pinning cmake / ninja in pyproject.toml (#12400)

Platforms such as Apple M1 may not have those specific versions
available. In general we should be able to build with a recent CMake /
Ninja.
diff --git a/compiler/pyproject.toml b/compiler/pyproject.toml
index 985249a..a56208f 100644
--- a/compiler/pyproject.toml
+++ b/compiler/pyproject.toml
@@ -2,10 +2,8 @@
 requires = [
     "setuptools>=42",
     "wheel",
-    # There is no fundamental reason to pin this CMake version, beyond
-    # build stability.
-    "cmake==3.22.2",
-    "ninja==1.10.2",
+    "cmake",
+    "ninja",
     # MLIR build depends.
     "numpy",
     "packaging",