i tried a 50D and did not find a significant difference in image quality from the 40D although the micro adjust is an advantage - and probably essential for the pixel density
pixel density also requires the best prime lenses to take advantage of the higher resolution
haven't tried the 7D yet - my only interest in it is whether it will get more resolution out of long lenses like the 400 f5.6 than a crop from the 5D2
for a noticeable improvement in IQ i'd also recommend the used 5D