Fix #66: write_imagei/ui/f checked for valid range

- write_imagef/u/i are now wrapped with a function that checks that the arguments are properly bounded.
- Adds support to kernel-runner for images that are written by the kernel (no read support yet).
- Fixes an issue with generating kernel function arguments with image parameters.