A brief history of how countries sleepwalk into war