When two-byte header extensions are enabled, kMaxId will change from 15 to 255. This CL is a refactor to remove the direct dependency between memory allocation and kMaxId. Bug: webrtc:7990 Change-Id: I38974a9c705eb6a0fdba9038a7d909861587d98d Reviewed-on: https://webrtc-review.googlesource.com/101580 Commit-Queue: Johannes Kron <kron@webrtc.org> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24801}