Improve math tests to allow a specific ulp bound.

At the moment our libm is only good enough for a 1 ulp bound on these tests,
but that's better than the 4 ulp bound you get from gtest by default.

I'm not really happy with the multiple structures and corresponding functions,
but at least they mean there's no duplication in the tests themselves, and it
should be easy enough for us to make further improvements in future.

Change-Id: I004e12970332e1d9531721361d6c34f908cfcecc
Merge "Improve math tests to allow a specific ulp bound."
Fix newlocale with a NULL locale name.

Bug: https://code.google.com/p/android/issues/detail?id=78567
Change-Id: I272dabc12ab186b44a525c7e8ac1846e62334e85
Merge "Fix newlocale with a NULL locale name."