Built-in sums and products

This pull request is a way to centralize the online discussion in this rather invasive change. I believe we'll eventually need to get something equivalent in master, but hopefully this can be discussed, simplified and better understood before. I have spent a copious amount of time rebasing against @protz additional comments, and this is a good thing as it forced me to equivalently comment the new functions.