The Games had been in doubt after the Australian state of Victoria withdrew as hosts, but Commonwealth Games Scotland have offered a lifeline