who was the last military general to be elected president