Added a column to portal_datasources so datasources can specify a directory from which .css files should be linked to from the HTML <head> chunk of the web page. Then I added the code to emit said link. And tested it for Oracle and PG, fresh installs and upgrades both.
Someone decided that defining a non-existent package and table when declaring the "portal_element_theme" object type was a brilliant thing to do, seeing as it breaks package_instantiate_object and all.