The Vatican and the Chinese government signed an agreement on Saturday on the appointment of bishops in China, ending a decades-long struggle over who chooses the leaders of Catholicism in the world's most populous country, but leaving major tensions in their relationship unresolved.