Implemented ocl_wait_gpu

OpenCL now correctly waits for GPU to finish the tasks in similar way as Cuda.