Councils and construction firms say they have lost large sums in the scrapping of school building plans.