How did California and much of the Southwest become part of the United States?