Why was Song China so advanced, and why did it ultimately fall to invaders?