Copy all function attributes (__doc__, __code__, __name__, etc) from original to JIT function

Uses functools.update_wrapper for most things, but __code__ is done by hand.