The building of the Mogao Caves on the cliffs of Minsha Mountain in Dunhuang lasted for 1,000 years. How were the caves built and why were they built?