Convert uses of the Dangerous APIs to use MemoryMarshal.GetReference (#15532)
* Convert uses of the Dangerous APIs to use MemoryMarshal.GetReference
* Adding Unsafe.AsRef(in...) and using that for ReadOnlySpan GetReference
* Fix typo - add missing bracket.
* Change AsRef(ref...) to AsRef(in...)
* Remove unnecessary whitespace
* Remove Unsafe.AsRef(in...) and its uses.
* Revert "Remove unnecessary whitespace"
This reverts commit
4dbe38cae472e868f74afbabde358f3a7609f6ae.
* Revert "Revert "Remove unnecessary whitespace""
This reverts commit
44d79483423ac9ffcf7c566b79d4a42c6aa15dac.
* Remove extra space to fix formatting.