Promote casts inside lets for peephole matching
Merge remote-tracking branch 'upstream/master'
More runtime settings tweaks

— Modify the glue to ensure that halide_set_runtime_settings() is
included in the weak linkage
— Update tests and apps that used setenv() to use runtime_settings
instead
— Remove the HL_NUMTHREADS usages in CodegenX86 selftest entirely

NOTE: I haven’t tested the NaCl changes locally, as I don’t have a
nacl-configured LLVM locally.