Opencl shared mem

Fixes for shared memory in OpenCL, this fixes #256. 

Always inserting barriers in Pipelines is a temporary solution.

With this pull request, every OpenCL test passes on both the Intel (CPU) and NVIDIA OpenCL implementations.