Backport 1.8 gh 4466

This backport is a wholesale copy of the `nditer_*` files into `maintenance/1.8.x`, which was the easiest way to handle the various updates. This also require backporting the `scalarmathmodule.h.src` file and the `numpy/core/setup.py` and `numpy/core/bento.info` changes needed to work with it.