ENH: umath: simplify pairwise sum

Simple recursive implementation with unrolled base case. Also fixed signed/unsigned issues by making all indices signed.

Added a unit test based on @juliantaylor's example.

Performance seems unchanged: still about a third faster than before.