pcp: Implement culling for specializes nodes
Change
2311004 caused a regression in memory usage because
nodes due to ancestral opinions beneath specializes nodes
were not being culled as they had been before.
For example, if prim /A specialized /B/C/D, Pcp would
recursively compute the prim index for /B/C/D. Prior to the
above change, Pcp would cull nodes in that prim index before
attaching it to the prim index for /A. After that change,
Pcp would attach the unculled prim index first, then attempt
to cull nodes later. However, this caused Pcp to hit a
clause in the culling code that explicitly ignored specializes
nodes, meaning the nodes for /B/C/D would be skipped over
entirely.
Culling for specializes nodes was originally unimplemented
because of the complicated duplication of node subtrees that
was part of how the specializes arc was implemented. Adding
this fixes the regression and actually reduces memory usage
even further than the original numbers.
(Internal change:
2312006)