The following is a programming paradigm suggestion that could be implemented very easily. A set of core Word Press function calls could be developed for managing any arbitrary set of "commonly" included "things" - in this case, java scripts but it doesn't have to be limited to just one type of "include". Only two function calls are necessary: register_script() and is_script_registered().
register_script() would be used by plugin authors to "register" the name of a script they intend to include in the output code. Function arguments would include the name of the script (for example: prototype.js or jquery.js), the major release number, and minor release number. Word Press would only be responsible for adding this information to a table. (Script path information is not necessary.)
is_script_registered() would be used by plugin authors to determine (at the time the plugin is initialized) if a script has already been registered by a previously initialized plugin or by the theme. If the script (along with the same major/minor release information) is present then the script would not need to be included. The presumption here is that the plugin or theme that registered the script would include it.
If the script is not in the table, the plugin can safely register the script and include it in the output. The return from this function would be NULL if the script in question was not registered OR it would return the script name, major release and minor release (in the form: "script name", major release number, minor release number). Returning the script details would give the plugin an opportunity to examine the version information to determine if it should continue.
"But my plugin won't work if the version I want to register is newer than a previously registered script with the same name".
This is where the "fun" begins in software development - working out the issues. This proposal is based on a “first-come-first-serve” concept. At the very least, a plugin that is dependent upon a script version can be a "Good Samaritan" and disable itself, output something intelligent to the screen or place a breadcrumb comment in the output HTML.
I didn't intend to work out all the issues and conflicts here but I did want to put this idea out there. I can’t be the only one that has encountered this problem. For example, Alex King wrote a nice little plugin called "Share This". The plugin includes "prototype.js". Prototype.js is already included by the K2 theme. Because there was a conflict in versions, I had to comment out the "include" statement in the "Share This" plugin to get things working properly with my K2 theme. If you are not a developer then these kinds of issues can turn you off to plugins, themes or even Word Press.
As an alternative, perhaps plugins shouldn’t include a script that the user could easily get from its publisher. Just direct the user to get the script and advise them as to where to put it.
Just a thought....