Made tutorials compile on windows
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
Windows stuff
memory header is not in tr1 folder in Windows
Simplified inf and nan intrinsics.

Somehow I made it to this point in my life without knowing that math.h
defines INFINITY and NAN.
C output includes all the math functions now
Portability

used std::numeric_limits instead of constants (which aren't the same on
all operating systems).
Set tests to not build when solution is built
Compiler warned about conversion from double to float
Fixed loading and saving for grayscale images