Complete redesign of the saved-state mechanism, providing the possibility of `program resources'. See resource/3, open_resource/3, and qsave_program/[1,2].