2014-01-17  Sharath Kamath  <s.kamath@samsung.com>

        Program callback optimisation

        Issue #420

        Reviewed by Antonio.

        The OpenCL clBuildProgram takes a void* user_data as a param and sends the same value back to the callback method.
        [http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clBuildProgram.html]
        So cant we use this to send a pointer for the WebCLProgram object and use it to get the calling WebCLProgram
        Object back in the static callback proxy method.

        This will be in par with callbacks in event and also avoid static Vector usage.
        Changing IDL to make devices optional as the per specification.

        Conformance test cases:
        [https://github.com/SRA-SiliconValley/webkit-webcl-conformance]
        conformance/bindingTesting/programAndKernel/cl_program_build.html
        conformance/functionalityTesting/buildingAndRunning/buildCallback.html

        * Modules/webcl/WebCLProgram.cpp:
        (WebCore::WebCLProgram::WebCLProgram):
        (WebCore::WebCLProgram::callbackProxyOnMainThread):
        (WebCore::WebCLProgram::callbackProxy):
        (WebCore::WebCLProgram::build):
        * Modules/webcl/WebCLProgram.h:
        (WebCore::WebCLProgram::callEvent):
        * Modules/webcl/WebCLProgram.idl:
        * platform/ComputeProgram.h:
        * platform/opencl/ComputeProgramCL.cpp:
        (WebCore::ComputeProgram::buildProgram):