ENH: Backport scalarmathmodule.h.src from 1.9.0-devel.

This is needed in order to backport npyiter fixes.
BUG: Backport nditer fixes and tests.

This is mostly gh-4466, but other bits had to come with it to
make it work.
DOC: Document backport of gh-4466 in 1.8.1 release notes.
Merge pull request #4504 from charris/backport-1.8-gh-4466

Backport 1.8 gh 4466
BUG: Buffered stride was erroneously marked fixed (fixes #4485)
TST: Test for einsum/nditer fixed stride bug
DOC: Add gh-4502 to the 1.8.1 release notes.
Merge pull request #4506 from charris/backport-1.8-gh-4502

Backport 1.8 gh 4502