To the southwest, the principality of Halych had developed trade relations with its Polish, Hungarian and Lithuanian neighbours and emerged as the local successor to Kievan Rus'. In what year did Mstislavich defeat the Kiev?