ENH: umath: simplify pairwise sum

Simple recursive implementation with unrolled base case. Also fixed
signed/unsigned issues by making all indices signed.

Performance seems unchanged: still about a third faster than before.