gallium: Use struct pipe_atomic for pipe refcounts.