Added a prototype for Function specialization.
Specializations now get their own schedules

and bounds inference understands the IfThenElses produced,
which means you can finally write fallback schedules for small inputs.

Part of this required wrapping the Schedule class behind a
reference-counted handle, so there's a lot of trivial code changes.

This also required many new simplification rules to keep the resulting
logical operators sane. Previously we never really generated big trees
of ands and ors.
Allow malloc to return NULL when the size is zero.
Bugfix in IREquality resulted in IfThenElse nodes never equalling
Added a new test to specialize
Merge branch 'master' into specialize

Fix class/struct discrepancy in header file.

Conflicts:
	src/CMakeLists.txt
Fix horrifying simplify bug

a && a -> false
Correction for mining And and Or chains.
More aggressive simplification of comparisons, mins, maxes

We now exploit bounds knowledge from containing for loops
Merge branch 'master' into specialize

Conflicts:
	src/CMakeLists.txt
	src/Simplify.cpp
Merge branch 'master' into specialize
Fix for handling IfThenElse node with undefined else clause.
Merge branch 'specialize' of github.com:halide/Halide into specialize
Merge branch 'master' into specialize

Conflicts:
	src/Lower.cpp
Merge branch 'master' into specialize

Conflicts:
	Makefile
	src/CMakeLists.txt
Add test where specialization may place stages on the gpu
Fix bug where we were injecting frees in one path of an IfThenElse
Merge branch 'master' into specialize

Conflicts:
	Makefile
	src/CMakeLists.txt
	src/Func.cpp
	src/Simplify.cpp
Added ability to specify that a var is serial.

Relevant if you have a parallel for loop, and later in the schedule you want
to split it into a parallel and serial part.
allow compute_at(f, x) when all of the specializations of f have an x

They can arrive at an x via different split paths in each specialization.

Also fixed a bug where a split of a rename got confused during split sorting.