From programming Christmas lights to 3D-printing spare parts for wind turbines, schools are finding new ways to teach technology – and reaping the benefits. Victoria Briggs investigates