what territories did the United States gain as a result of the spanish American war?