Add base_name helper
Fix "control reaches end of non-void function"
Add stream output for Scope symbol tables
Factor CodeGen::Closure into shared component

The new logic is a bit more generic, and lives under CodeGen_Internal.cpp,h
(It's now shared by the GPU backends.)
Merge branch 'master' of github.com:halide/Halide