Seventeen young girls died and several others were injured when a fire swept through the dormitory of a school for children of hill tribes in northern Thailand, officials say.