Track pipeline groups using a shared reference counter instead of a linked list. (cherry picked from commit 513afd33) (cherry picked from commit 9446629b)