Reworking reductions (WIP)
Simplify a % b where b is a constant and we know (0 <= a < b)
Updated tests and tutorial to respect new reduction behavior
Merge branch 'master' into rvar_reorder
Added a test that illustrates a remaining bug.
Better bounds inference for a chain of update steps.

I'm not confident that this doesn't mess something else up. E.g. the whole
least-common-multiple code used in BoundsInference seems bogus now.
Merge branch 'master' into rvar_reorder
Rework of bounds inference:

- The unit for bounds inference is now stages instead of functions. A pure
function has one stage, a function with three update steps has four stages,
etc. This means there are no more hacks related to recursive bounds in update
steps.

- Bounds required of a stage are given by analysis on the graph of
functions, ignoring scheduling concerns.

- Bounds computed of a stage are determined by analyzing the lowered
code within each loop level of that stage's production. Things like fuse,
splits followed by reorder, etc, make it too hard to do this analytically.

- Bounds allocated for a realization are computed by analyzing the lowered
code.

- All tracking is done in terms of min/max instead of min/extent, which is what
makes this approach tractable.

This also removes the whole min_extent_computed nonsense, which was required
because the previous method tried to avoid analyzing lowered code.

Still todo:

- Extern stages are broken completely by this change.

- Sliding reductions only check that the final stage required slides. Values
may have been clobbered by earlier stages.
Fix bug where we fold more than one dimension of a func.
Fix handling of extern stages.
Update two tests for the new bounds inference behavior.
Added a complex multi-stage reduction test.

It recursively expands its bounds.
Reduced reduction_chain test verbosity
Made bounds inference once again use output buffer constraints.
Reduced size of sort test because it seems to cripple llvm

bitonic sort stalls inside of llvm jitting.
Freeze a pnacl version that is known to work.
Fix for trunk llvm removing a method
Merge branch 'master' of https://github.com/halide/Halide
Continuing work on allocation bounds simplification issues
Remove dead include