gallium/identity: consolidate sampler, sampler_view code