When I read Joel's article, I was imagining in my head a JS-prime => JS + (maybe) CSS compiler, where JS-prime feels just like JS, except it makes it impossible to write something that doesn't work "the same" in all browsers. I think that this would be huge if it existed, except after reading your post, I'm thinking maybe it does already exist. Yes?
Also, could you clarify your statement: "The most annoying limitations are imposed by the browser (meaning that no JS library is going to fix them)." Do you mean the there are things that browsers simply can't do (e.g., your "file uploading that doesn't suck" example)?
The compatibility problems are not in the core language (which is surprisingly portable between browsers), but in the DOM API. This can be solved by a compatibility layer library like JQuery, Prototoype et al.
Joel claims that this layer slows JS an order of magnitude, which is greatly exaggerated. The difference between calling the DOM directly and through a library is barely noticeable.
A very clever compiler could probably optimize some overhead away (e.g. transforming into browsers specific code with the compatibility layer optimized away), but I doubt there would be any major gain speed-wise.