[MCJIT] Reapply r222828 and r222810-r222812 with fix for MSVC move-op issues.