Reworked and enhanced _foreachProperty

Switched to use DisplayPropVal, and added _definedOn and _isInherited to
make use of the added power.