War, State Formation, and Nationalism