Military struggle and identity formation in Latin America: race, nation, and community during the liberal period