Fix missing image qualifiers when generating wrapping checker code

This change prepends read_only or write_only to an image type, when a wrapper for write_image is being generated.

It moves function declRefExprViaImplicit to WebCLTypes, which provides means to find the declaration of a variable, even if it has been casted implicitly (once). This is used to find the image_type qualifiers attached to the declaration.