Online retailer Boohoo will buy the brand for £55m, but not its shops, putting 12,000 jobs at risk.