Merge pull request #216 from dsharlet-intel/master

Added mechanism for selecting device types
Fixed warnings from cl.h on 64 bit target
Lowered version requirement for standard CMake package on Ubuntu
Update a few calls to halide_error and halide_copy_to_host from apps. These were
missed in the user_context conversion since we don't do this via a header file.
Bit more info in debugging output so one can see the buf ptr and track
allocs and frees more easily if the buffer_t has the same address,
which it ususally does.
Comment out unused formal arguments in case there is a warning for them.
Filter out -lz -lpthread -lrt -ldl from llvm-config --libs

They don't work for the static compile.
Build target triples using the Triple::enums instead of string parsing

This fixes a bug where arm android wasn't actually eabi, resulting in
32-bit aligned stack pointers instead of 64-bit aligned, resulting in
chaos and misery.
Expose a routine to intialize llvm. Needed it for testing an idea and this
seems a decent design to commit.
Add support for ImageParam values becoming ExternFuncArguments. Was
omitted previously and is just a smalladdition. Added test case.
Allow passing in Target explicitly for calls that previously depended
on HL_TARGET environment variable via get_target_from_environment. Most
previous behavior is preserved but JIT calls default to get_host_target
instead of get_target_from_environment as the latter would crash
if the target does not make sense for the current host.

Added a method to parse a target string.
Fix a bug with multiple outputs from an external array function
not compiling because of a mismatch in the name used for the bounds
representing the entire output Tuple.

Added a test case for to catch this failure.
Re-enabled ability to control default jit target features from environment.

Use HL_JIT_TARGET. The host, arch, and os must match the host target.

This means the nightly tests actually test different feature sets again
(e.g. no avx, cuda).
Fixed saving Image<signed integer type>
Overhaul of binary tracing to support post-mortem trace analysis.

Fixed bug causing trace files to be ridiculously huge. They're still large.

Every trace event has a parent id. The trace function returns an integer to
use as a parent id for child events. This helps disambiguate loads/stores
to different realizations of the same func occuring in different threads.

There's the start of a trace analysis tool checked in.
Merge branch 'master' of github.com:halide/Halide

Conflicts:
	src/CodeGen.cpp
	src/Func.h
	src/JITCompiledModule.cpp
	src/JITCompiledModule.h
	src/runtime/HalideRuntime.h
	src/runtime/tracing.cpp
	test/correctness/autotune_bug_2.cpp
	test/correctness/autotune_bug_3.cpp
	test/correctness/autotune_bug_4.cpp
	test/correctness/tracing.cpp
	test/correctness/tracing_stack.cpp
Merge branch 'master' of https://github.com/halide/Halide
Added overloads of realize to enable passing target without all 4 sizes
Passed Target instance to compile_* and realize
Added more overloads to support default Target argument