Moved _foreachProperty et al into a new Introspection module

Realized that this is going to turn bigger than originally expected, so
let's give it some breathing room.