For the first one, Splitbrain has done that. I'm not sure how.
For the second one, you can differentiate the style by a class name in the outer container and prefix those style selectors that require it by the classname. That prefixing could be done in some form of post processing.
However, I think your describing a case for some interaction between the css & js aggregators and the plugin. I envisage a mini event for each plugin. [css|js]_plugin_retrieve. plugin data would be plugin name and a list of css/js files. default action would be to read and concatenate all the files (for that plugin). A before handler could alter the file list. An after handler could change the css/js.
Back to your original comment. Individual JS and CSS files can be loaded using an action plugin and modifying the metaheaders with the TPL_METAHEADER_OUTPUT event,
http://www.dokuwiki.org/devel:event:tpl_metaheader_output. Store them with a name or location that isn't checked by the main aggregator script.