Add halide_opengl_context_lost() function

This discards all state associated with the old OpenGL context and forces them
to be re-initialized when the next Halide filter is run.
Update OpenGL documentation
Use render-to-framebuffer in Android example
Merge branch 'master' into glsl_android
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.
Don't put extern "C" functions into a namespace

since the names actually aren't in the namespace...
fix typo
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.
Added a stream compaction test case
Only run tutorial lesson 12 if it can find libOpenCL
Bail from tutorial on first error
Remove -g from static test runs.

It fails on OS X when the object file was generated with trunk llvm.
Generating the binary is fine, but building the dSYM folder fails
with assertion:

Assertion failed: (linked_addr_pos != line_table_map.end()), function FixReferences, file /SourceCache/dwarf_utilities/dwarf_utilities-119/source/DWARFdSYM.cpp, line 3749.

I'm hoping this problem will magically fix itself with either an llvm or
dsymutil update.
Disable nightly opencl testing on os x

My mac mini has flaky AMD drivers, and the CPU drivers only support
1D work groups.
Fixed generation of overflowing constants in Int(32) expressions.