Added type validation of buffers and images in WebCLCommandQueue, and of memFlags in getSupportedImageFormats. Fixed a regression in buffer/image validation.