Here is my thought for the modules. I currently use a system for another project like this:
Inside the directory portal/ or whatever have a directory called Modules/
inside here is where all modules can be placed in their own directories. each directory i.e /portal/Modules/Calendar/ would have a pkg.cfg file, no more than a text file that looks for example like:
Name: Calendar 1.0
Date: xx Jan 02
Permissions: blah blah
SQL Import: meep meep
the Enabled [Boolean] tells whether it is on or not [better to use a db for this], my current setup it needs to be manual.
now you could set any special prefs etc in for it to be read in and a sql file to import if a table etc needs to be created all 'contained' in its seperate directory.
basically you add a module , it reads in the pkg.cfg file and does what is neccessary to make it work, and the pkg.cfg guides the portal core when needed.
I have it so a cron job auto adds modules to my list currently, but that is on our ultra 60, so I would think another way is to go into module manager or whatever and scan for directories and their pkg.cfg files that are not already listed.