yeah that's basically all correct. The 10% ethanol isn't used to necessarily reduce our dependence on foreign oil. We used to use an additive called MTBE but because of environmental concerns it's much less common. Since then, it's been replaced with Ethanol. As for your truck pinging, the dealership that told you that would be wrong. Ping is a result of not enough octane, when you buy fuel that is rated at a given octane it's been tested to meet those standards. So 87 octane with MTBE is going to have the same results as 87 octane with Ethanol as far as pinging goes.
But like you said ehtanol contains less energy per volume than gasoline, which is why you see the decrease in gas mileage. It's a little confusing but the amount of energy by volume has nothing to do with whether it pings or not, that's controlled by when it ignites.