Fix build_sysimg.jl on Windows when linking failure occurs (#21235)
In case linking fails, fall back to `syimg_file.old`. For windows we first attempt to link to a temporary sysimg_file; if this fails we simply, it fall backs to the current sysimg_file in use safely. This is done since Windows has difficulties overwriting a file in use.