Try to make the choice based on your most likely usage pattern or needs.
There isn't one lens that is able to fulfill your every needs and budget. There will be shortcomings in whatever you choose. You just need to work around it choose something that works for you in most of the situation. Forget about looking for one that is able to do more then what you really need.
If you are constrained by cost, then choose the second best that is able to do the same job.
Go try out the different choices that you have in mind to have a better understanding of what fits you.
I have a EFS 17 - 85mm IS(used) that i bought recently and i am using a Canon 40D also. I have tried out Tamron 17 - 50mm F2.8, EFS 18 -55 IS, EFS 18 -55, EFS 17 -85 IS & EFS 17 -50 IS F2.8 before deciding on EFS 17 -85 IS.
Btw, all of them are wide angle zoom lens which is what i needed for my first lens..
EFS 17 - 55 IS F2.8 - This lens is good but it is way out of my budget.
EFS 18 -55 - Cheap low end lens. I would give this one a miss.
EFS 18 -55 IS - The IS really works and the lens is quite light. Good for traveling.
Tamron 17 -50 F2.8 - I did seriously consider this one. Like the F2.8 and price.
Finally i decided to get the EFS 17 -85 IS as i think i will most likely use the extra zoom range more often that the F2.8 that the Tamron lens have to offer.
Hope my little advice is able to help you better decide on the lens that you want to buy.