I had a 40d and sold it for a 1DmkII (Non-n version) so i feel the imput from me might be helpful.
Firstly, AF. The 1DmkII wins hands down in my opinion, and with the 45 point AF system, its so much better then the 40D. That said, the 40d isnt bad on this note (I upgrade to the 40d from a 350d)
Secondly, Noise. At High ISO's, the 40d imo handles noise alot better then the 1DmkII, but not by much. In brighter conditions where you need to up the ISO to get a better shutter speed, then its closer still as i find noise improves. In the dark, dim night clubs i used to shoot bands in, the noise was better on the 40d.
Next, Build Quality. The 1DmkII is a tank, its a beast of a camera as is all the 1D series. If that suits you, the go for it, if not then stick with the 40d and get the battery grip, so you can use it when you want to but if you want a lighter camera you can just take it off. Personally, the stable feel and the overall build of the 1DmkII is superier here.
Frame rate. The 1DmkII fires at 1.5fps faster then the 40d. Is that of dire importance for you? The other thing to think about is that the 1DmkII has a smaller buffer then the 1DmkIIn, so if you are a "spray and pray" photographer, you might find that your buffer fills up too quickly, but thats down to you.
Not knowing your kit, and what you do with photography (hobby or for a living) it might be an idea to spend the cash on lenses and not on better bodies. The 40d is a good camera, but a better camera with great lenses
Mike