direct implementation of log1p and expm1

Didn't like the fact that I had to import a monomorphic function through
the FFI, can't imagine that being good for performance, either.  So
here's the 100% Haskell replacement.