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 'master' of https://github.com/halide/Halide into windows