Experimental rewriting of the runtimes to not use system headers

Also compiles with flags stating the halide arch, os, and target string
OS X build fixes
Includes in the wrong order
Many incorrect #define names sneaked through initial testing
Forget to check in a file.
Fixed __android_log_vprint signature
Removed pointless defines from arm android
Removed gratuitous blank lines.
Unified different write_debug_image versions to all use fopen/fwrite/fclose
Tell cmake to use g++ and gcc to compile llvm
Merge branch 'runtime_refactor' of github.com:halide/Halide into runtime_refactor
Also catch SIGBUS for os x
More robust check for llvm version
Changed initial module creation to dynamically compose precompiled modules

Also required refactor of how targets are specified. Now it's a struct instead
of a string.

Also added code to CodeGen::optimize_module that strips out unnecessary symbols
Merge branch 'runtime_refactor' of github.com:halide/Halide into runtime_refactor
Test script was sniffing underscore instead of hyphen for 32-bit builds.
Build fixes on OS X
Merge branch 'master' into runtime_refactor

Conflicts:
	src/CodeGen_ARM.cpp
	src/runtime/posix_math.cpp
	test/scripts/test_target.sh
Performance tests weren't running single-threaded on os x
Link initial modules together more reliably for llvm 3.2