ENH: Import the cacos,casin,cacosh,casinh implemenation from FreeBSD

The code from FreeBSD was lightly adapted to fit with the numpy style.

Several incorrect branch cut tests where fixed. (All of these for all of
the arc* functions that were changed have to do with getting the correct
branch cut for (x,0) or (0,x).)

With this commit npy_cacos(f), npy_casin(f), npy_cacosh(f), and
npy_casinh(f) pass all of the tests in test_c99complex.c.