rustc: Prepend a length to all metadata

One of the causes of #19501 was that the metadata on OSX was getting corrupted.
For any one particular invocation of the compiler the metadata file inside of an
rlib archive would have extra bytes appended to the end of it. These extra bytes
end up confusing rbml and have it run off the end of the array (resulting in the
out of bounds detected).

This commit prepends the length of metadata to the start of the metadata to
ensure that we always slice the precise amount that we want, and it also
un-ignores the test from #19502.

Closes #19501
aren't four separate calls to `insert` going to move the contents over to the right four separate times?

If your intent is that this be temporary code that we remove once the source of the garbage is identified, then that cost may be fine.  But I suspect we would be better off leaving the length in even after we identify the current source of the garbage.