Adds naive implementation of OpenCL kernel.

Also solves a long time bug with readSourceFromKernel that sometimes
made the program crash.