Added cos function & fixed tests (again)

Added cos function from musl library.

This time the sin and cos function tests are put in the mathtest.c
file.  gcc has no way of knowing how to optimize these tests as
constants anymore.