40D has bigger viewfinder, higher FPS, higher quality build but less MP (with around the same image quality), and no video. Not sure about the focusing systems, both should be acceptable. I use an XSi now but have used my stepmom's 50D and love the ergonomics of it compared to my rebel. Back wheel is a huge addition if you ever shoot in M mode, and the body feels much more substantial. The bigger viewfinder is very nice as well. I love my XSi, great little camera, but my next upgrade will be something from the XXD line (probably used 50D in a couple years) or a used 7D a few years down.
Really depends whether you'd appreciate the ergonomics of an XXd camera over a Rebel. Some care, some don't - go to a camera shop and feel a rebel and an xxD to see if it matters to you.
40D vs. T1i? I'd pick 40D.
Why? Bigger, brighter viewfinder, better AF (9 cross points vs. 1), two control wheels, bigger, more ergonomic body, much better build quality, faster framerate, and similar image quality.
However, if it was 40D vs. T2i I would take the T2i because the sensor in that is much improved over the T1i/50D sensor.
I'm a T1i shooter, and once you go to the 40D/7D size, you can't go back... however in terms of IQ, the T1i is very nice. The T1i outdoes the 50D. Many people will complain how the 50D vs 40D was not as good in terms of noise, but if you look at T1i vs 50D reviews, the T1i is a notch better and improves on high ISO noise.
Where did you get this info? As far as I know, the T1i and 50D have the same 15 megapixel sensor.
DxoMark results seem to confirm this: http://www.dxomark.com/index.php/en/Camera-Sensor/Compare-sensors/%28appareil1%29/272|0/%28appareil2%29/586|0/%28appareil3%29/180|0/%28onglet%29/0/%28brand%29/Canon/%28brand2%29/Canon/%28brand3%29/Canon