factor out symbol -> cl_mem_flag conversion so it can be shared with other mem object constructors