What agreements were made to make sure that there wouldn't be a war for world war 1 but drew different countries into the war?