Refactor core::run to remove the ProgRepr struct...

...which was a legacy from the time when destructors were implemented using resource types.