Rewrite of common-subexpression elimination.

Produces much saner final IR, in approximately the same amount of time.
It was necessary to add an optional cache to IR comparisons to keep track of
known-equal Exprs.

Things tried that didn't help:
- Adding hash codes to all IR nodes to speed up deep compares.
- Caching results of IR comparisons that return not-equal.

Except in pathological cases, comparing unequal IR nodes terminates
very quickly, so the caching in those cases adds pointless overhead.
However, equal IR nodes do a tree traversal of what might be a graph,
so you get exponential runtime if you don't do some caching.
Merge branch 'master' into cse_rewrite
Comment fixes.
Clarify why some code is commented out.
Fix use-count tracking.

Also handle reused let names, and reenable test.
Remove commented-out code
Style fixes.
Put internal code in anonymous namespaces.
is_const now returns true for StringImm
Clean up the logic in IREquality.
Remove C++11ism
Merge branch 'master' into cse_rewrite
Merge pull request #481 from halide/cse_rewrite

Cse rewrite