Program module tweaks

Remake of #966

    Change individual program modules to be proxy classes instead of
    abstract base classes. (Abstract base classes are for inheriting from;
    proxy classes are for extending Python behavior. Program modules want
    the latter.)
    
    Change module extensions to be specified using a classmethod, rather
    than by inheritance. This is because proxies aren't allowed to inherit
    from multiple model classes.

    Change behavior of ProgramModuleObj.fixExtensions(): rather than
    update the instance dict with all of the module extension attributes,
    just add one attribute which points to the module extension itself.
    
    This will break existing code that tries to access module extension
    attributes directly as module attributes. Add __getattr__ method for
    backward compatibility; if code tries to access attributes of a module_ext
    directly as attributes of the module, let it work but raise a DeprecationWarning.