Former Gov. Pete Wilson of California used a surprise appearance before the state’s Republican convention Saturday to endorse Senator Ted Cruz, warning that the nomination of Donald J. Trump could lead to political ruin for the party’s candidates this November.