Tang China's influence over Japan ended in what year