clSetKernelArg: more check to conform to the spec

This patch adds more check in clSetKernelArgs (OpenCL 1.2 specification)
test test_null_arg.cpp was also fixed to pass the testsuite.