Which war played a role in ceding San Diego to the United States