I agree with what you say about our education system, but the US generally has an economic system that attracts the top brains of the world (people like you!). There are two ways to achieve technological superiority, you can homegrow it or you can import it. The US is one of the best importers of great minds. Perhaps if we had a better educational system we would import less, but the downside to that is that we would then not be so willing to bring the 'creme of the crop' into the country.
The US has a great deal of appreciation to give the immigrant who brings their desire and education. Of course, I think many if not most Americans realize that immigrants mainly built this country and are continually to be credited for keeping us a strong economic power. In exchange the country should continue to improve our immigration policies.
As for the education process in the US, the 'heat' needs to be turned up. However, let's don't forget that smart people can get their act together at any time in their life. What the education statistics don't say is how smart people later in their life are able to take their smarts to higher levels. It may not be in pure scientific research, but often it is in technology. I think we would all be seriously discounting US technology if we attributed all American technological superiority to immigrants. Let's face it, Bill Gates and many others grew up in suburbia. Even within the past 20 years many of the most advanced computer hardware technologies, communication technologies, biotechnologies, medicine, defense technologies, aircraft technologies, space technologies, internet, computer software, cellular technologies, etc were all developed in the USA (or we are usually within 2-3 of the top leaders). For a country comprosing only 5% or less of the world's population that isn't such a bad state of the union. You might say that God is still looking out for America ;}
Warm regards, Harv