An Optimal Control Model of Arms Races