Use more spans in `System.Reflection.Metadata` et. al. (#76574)
* Use Unsafe.As in ImmutableByteArrayInterop.
Code quality increases.
* Optimize methods in the BlobUtilities class.
* Include more information in exceptions thrown from catch blocks.
* Use spans in BlobContentId, avoiding ImmutableByteArrayInterop.
* Use spans in BlobWriter, reducing pinning and ImmutableArrayInterop.
* Use spans in BlobBuilder, reducing pinning and ImmutableArrayInterop.
* Remove NoInlining from the throw helpers.
It prevents the JIT from looking into the method's body, realizing it's a throw helper, and doing what's best (such as considering it cold).
* Inline `BlobUtilities.Read(Immutable)?Bytes`.
* Avoid a length check introduced by the use of `BinaryPrimitives`.
* Remove `DisallowNull` from `ImmutableArrayInterop.DangerousCreateFromUnderlyingArray`.
* Remove an early bail-out if the buffer was empty.
* Stop using value tuples.
* Fix tests and expose writing a span to BlobWriter.
* Fix stack overflows.
* Shorten BlobUtilities methods that write integers.
* Optimize some methods in `MemoryBlock`.
13 files changed: