In 1821, Mexico won its independence from Spain, and San Diego became part of the Mexican territory of Alta California. What was the name of the Mexican territory San Diego became part of in 1812