Backport shared-memory optimization and add for OpenCL 1.1 workaround

clEnqueueFillBuffer only available in OpenCL 1.2 - enqueue a fill_zeros
kernel when building with OpenCL 1.1