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

New version using functools.update_wrapper, as suggested by @pitrou.

Resolves #470.