Implements cache function to TypedDataTemplateSelector.
Refactors NumberComparisonToBoolean/VisibilityConverter.