When pruning function bodies, enable pruning side-effect-free "stateful" ops.
When pruning function bodies, enable pruning side-effect-free "stateful" ops.

Previously, function pruning would leave in place ops marked as "stateful" that are also side-effect free, even when they have no downstream dependencies. In the case of "ResourceGather" this op can trigger a relatively large amount of CPU work and memory bandwidth consumption, so it is valuable to be able to prune it.
