2013-11-11  Sharath Kamath  <s.kamath@samsung.com>

        Add support to Callback for WebCLProgram::build() API.

        Issue #299

        Reviewed by NOBODY (OOPS!).

        OpenCL buildProgram() supports a callback functionality, where the users can call
        a buildProgram asynchronously. The same needs to be supported for WebCLProgram::build(...)  API.

        OpenCL returns to the callback with 2 params, OpenCL program object (CCProgram) and userData.
        With WebCL, we need to Map the CCProgram to the corresponding WebCLProgram object and call the
        webkit call back, handleEvent() api.
        Here we use the userData as a index to a static Vector. On each call to build with callback,
        append a copy of this pointer to this Vector and send index as userData. On return this static
        member will be used to retrive the WebCLProgram.

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

        * DerivedSources.make:
        * Modules/webcl/WebCLCallback.h: Renamed from Source/WebCore/Modules/webcl/WebCLFinishCallback.h.
        (WebCore::WebCLCallback::~WebCLCallback):
        * Modules/webcl/WebCLCallback.idl: Renamed from Source/WebCore/Modules/webcl/WebCLFinishCallback.cpp.
        * Modules/webcl/WebCLCommandQueue.h:
        * Modules/webcl/WebCLEvent.cpp:
        (WebCore::WebCLEvent::setCallback):
        * Modules/webcl/WebCLEvent.h:
        * Modules/webcl/WebCLEvent.idl:
        * Modules/webcl/WebCLProgram.cpp:
        (WebCore::WebCLProgram::WebCLProgram):
        (WebCore::WebCLProgram::callbackProxy):
        (WebCore::WebCLProgram::build):
        * Modules/webcl/WebCLProgram.h:
        (WebCore::WebCLProgram::callEvent):
        * Modules/webcl/WebCLProgram.idl:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/js/JSCustomWebCLFinishCallback.cpp:
        * bindings/js/JSWebCLCommandQueueCustom.cpp:
        (WebCore::JSWebCLCommandQueue::finish):
        * bindings/js/JSWebCLEventCustom.cpp:
        (WebCore::createCallback):
        (WebCore::JSWebCLEvent::setCallback):
        * bindings/js/JSWebCLProgramCustom.cpp:
        (WebCore::createCallback):
        (WebCore::JSWebCLProgram::build):
        * platform/ComputeContext.h:
        * platform/opencl/ComputeContextCL.cpp:
        (WebCore::ComputeContext::buildProgram):