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.
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.
Merge branch 'master' of https://github.com/halide/Halide
is_const now returns true for StringImm
Clean up the logic in IREquality.
Remove C++11ism