Fix problems with different platforms when creating a program

* Makes the platform related functions to behave correctly with GLSL,
CL and JavaScript platform
* All Xflow tests should now pass properly
Add video support to CLProgram

Makes CLProgram to work correctly with video input.