Introduce IsConnectionIdLengthValidForVersion

This CL is part of a larger change to allow the new connection ID invariants. It adds a new method QuicUtils::IsConnectionIdLengthValidForVersion() whose goal will be to replace uses of kQuicMaxConnectionIdLength in the codebase. This CL also plumbs the QUIC version to the TLS transport parameter parse/serialize code so it can call IsConnectionIdLengthValidForVersion. I suspect the transport parameter code will eventually need the version anyway as we create more QUIC versions that support TLS.

gfe-relnote: refactor, protected by disabled quic_enable_v47 flag.
PiperOrigin-RevId: 260938227
Change-Id: I590f7117de2b245044469e6dcdcca6f503c7a625
diff --git a/quic/core/quic_utils.h b/quic/core/quic_utils.h
index db29740..11154a5 100644
--- a/quic/core/quic_utils.h
+++ b/quic/core/quic_utils.h
@@ -181,9 +181,15 @@
   static bool VariableLengthConnectionIdAllowedForVersion(
       QuicTransportVersion version);
 
+  // Returns true if the connection ID length is valid for this QUIC version.
+  static bool IsConnectionIdLengthValidForVersion(
+      size_t connection_id_length,
+      QuicTransportVersion transport_version);
+
   // Returns true if the connection ID is valid for this QUIC version.
-  static bool IsConnectionIdValidForVersion(QuicConnectionId connection_id,
-                                            QuicTransportVersion version);
+  static bool IsConnectionIdValidForVersion(
+      QuicConnectionId connection_id,
+      QuicTransportVersion transport_version);
 
   // Returns a connection ID suitable for QUIC use-cases that do not need the
   // connection ID for multiplexing. If the version allows variable lengths,