Give a better assertion failure for module serialization issues (#52306)
This issue confused me for a few hours. Basically what happened was that
I had some IR that verified fine, but did not survive a deserialization
round-trip (related to mismatching pointer types, which of course are
starting to lose their meaning in LLVM). In this situation, the first
assertion hit was the failure to verify the LLVM module at the output,
but I had a hard time figuring out where this IR was coming from, since
it looked totally corrupted. If LLVM assertions had been enabled, I
would have seen the cantFail give a proper error, but since I only had
Julia assertions enabled, I did not see this error message. Try to
improve this situation by also asserting the absence of serialization
errors using Julia assertions, not just LLVM assertions.