A group of investors has agreed to buy the Ving Group, which includes the Nordic airline of collapsed UK leisure carrier Thomas Cook.