I do notice a bit vignetting at F2.8 on the 17-55, but it hasn't been a problem for me yet. I only use F2.8 for portraiture and low light stuff, and for me vignetting is typically not a concern in those situations.
The 17-40 doesn't have F2.8, so the comparison is not applicable there. At F4, I would be surprised if vignetting is a lot different between the two models. Of course, I have not used the 17-40 myself, so don't quote me on that.
The 17-40 definitely has better build quality, and that's important to a lot of people. To me, the 17-55 has more than adequate build quality itself, much much better than the kit lens. I care mostly about the end product--the pictures. Better build quality unfortunately does not show up in my pictures.
I guess what I'm getting at is that both lenses are terrific candidates, along with the Tamron and Sigma lenses I recommended above. The F2.8 lenses allow one to handle more situations than a F4 lens, especially when it comes to portraiture and low light.
The 17-40, more suitable as a wide-angle lens on a full frame body, has been a very popular normal zoom (general purpose) lens for crop bodies because Canon didn't offer a high-quality OEM lens for crop cameras around this focal range. (Many people hesitate to purchase third party lenses.) The 17-55, in my opinion, has changed all that. Its biggest downside is the price, and that's a very valid concern. Here in the U.S., one can get the 17-55 right now for about $850 with Canon's instant rebate and some other coupon, but it's still $200-$250 more expensive than the 17-40.
So to sum it all up, I would be somewhat hesitant to get a 17-40 as a general purpose lens for a crop camera and would consider the 17-55 and the third-party F2.8 lenses first. Now, depending on one's shooting style, I think that choosing between the 17-55 and the 24-105 would be a harder decision to make.