Add Math polyfill

This implements the new ES6 Math functions.

The implementation is based on V8 and MDN as well as the spec.

The tests are mostly just smoke tests. I'm not testing a lot of
edge cases.
I think the whole point of having `log1p()` is to deal with small x, see http://www.johndcook.com/cpp_log_one_plus_x.html