Made images castable to a non-const buffer_t *

The headers generated are now non-const, so this is necessary to still
pass Halide Image objects in.
Check for unistd in compile_to_lowered_stmt
Merge branch 'pr/115'
Changed cast to be more portable.
Add optional name arguments to the helpers in InlineReductions, so that their results in the new Profiler are more easily readable.