bpo-29962: Implemented app-level math.remainder

Merged Bitbucket Importer requested to merge branch/py3.7-bpo-29962 into branch/py3.7

Created originally on Bitbucket by Yannick_Jadoul (Yannick Jadoul)

This should fix the error in the math tests. I reckoned an app-level implementation would be easier in this case? The only catch is that to do so, I had to merge in the bit of logic from the math_2 wrapper n CPython's mathmodule.c.

Cfr. https://www.python.org/dev/peps/pep-0537/#features-for-3-7 and https://github.com/python/cpython/pull/950

Merge request reports