Further work on limitedDiscreteValues in Factor, Family and Template.  A little dabbling with element iterators in Tensor, but not sure this should stay.  Rework ResourceLexicons to be a class rather than an object.
Fix bug in limitedDiscreteValues.  Add more lexicons to ResourceLexicons.
Merge.
Fix broken merge.
Fixing Tensor.+ and sum to make BP pass tests.
merge