add an internal function to replace Main, use it in sysimg.jl

make the Core.Main binding non-constant, so uses of "Main" in general refer to the *current* Main. Doing "import Main" will give you a constant reference to the Main at that time.

fixes #5802

related to #1195