The GPU and new CPU compositors leak memory when an output is connected
to multiple inputs inside the same pixel operation. That's because nodes
do not know that their multiple outgoing links are in fact going to the
same operation, so their initial reference count is more than the actual
reference count.
To fix this, we keep track of the reference count of pixel operation
inputs and release the inputs based on that reference count.