Say we magically got rid of the security problem (thus eliminating a middle tier - and I admit it'd be some pretty mean magic), then could your second point could be addressed by this: http://news.ycombinator.com/item?id=4518443 ?
Regarding your third point, I agree it's not the most elegant of languages - but if some language which is elegant could run on browsers and had database access capabilities, would one use that instead of having a middle tier to generate "pages"? (as things stand, much of the middleware these days generates and receives JSON/XML and data anyway - can we do away with generating that initial HTML totally?)