resources: more roughing in of new class-based resource paradigm, and supoprt for "external" packages.