Only copy task NamesFactories when modified

Use a COW model for NamesFactories as an optimization, and to pave the
way for many other optimizations. Although currently copying
NamesFactory does not have a measurable impact on the performance of
tasks, it may eventually. Additionally, being able to detect that a
change was made to a NamesFactory makes it possible to optimize
refreshing a TaskTree.Node which is needed to correct Node behavior when
evaluating subsequent changes.

The NamesFactory and Expander calling interfaces have been adapted to
more easily enable COW processing, and this nicely helps illustrate the
NamesFactory dependency on task properties better.

Change-Id: I1406a193edf236152fa197d3af5356a55b307730
3 files changed