Fix a memory leak

The dev codegen object wasn't deleted
Fix printing the address of the cleanup routine

Apparently function pointers don't get printed as pointers
Tolerate deinitialization errors when releasing ptx module

If you have a static handle on a JITCompiledModule (e.g. via a global
Image or Func), halide_release gets called when the driver is in the
process of shutting down.
strip trailing whitespace
Merge branch 'master' of github.com:halide/Halide