Use a SubNodeAdder to add TaskTree SubNodes

The new SubNodeAdder stores data that is only needed while adding
subnodes, and thus it is discarded after this completes in order to
immdediately free up the memory for this data since it will never be
used again anyway. Previously this data was only freed once a node's
subnodes were refreshed which only happens when a node is applicable
again for another change.

In some real world use cases, there are over 1K nodes which are not
applicable for each change, a singificant amount of memory can end up
being used much longer than needed, until another change in the same
node is processed or the end of the query. Multiply this by > 1K nodes
and this ends up being a lot data being held for much longer than
needed.

Change-Id: I941a2d686425a7d12a2b5bd82c23293b08658ede
1 file changed