native frexp function

This implements the `frexp` function in native julia. It is roughly 10x faster than calling the libm function (as it avoids passing by reference), and doesn't require keeping a global array around (so no threading issues).