You know when people say that macs hold there value? That tends to mainly just apply to the baseline models. Apple make their easiest money on the upgrades - sometimes around a 500% markup or even more on ram. The baseline model is by far the best "value", and it's worth aiming close to that and upgrading whatever you can yourself. I say "aim for" because you might consider it worth going for at least a gpu or cpu upgrade (if you really want the graphics power or need the 8x multithreaded processing) as you can't easily or cheaply add these yourself. Definitely don't pay apple's ram prices as you say, but personally I'd also be wary of their hdd/ssd prices. It's yet to be seen if the drive will actually be replaceable by opening the new imac yourself but it's looking less likely as the new screen front appears it may be sealed, as with the RMBP.
I'm tempted buy a new imac but I'll give it a couple of weeks for ifixit to confirm if it is possible to gain access to the hdd. I already have a 512GB ssd that wasn't too expensive so I'd rather use that than pay crazy apple prices for a ssd drive or combo.
So unless money is no object, be steady on what you upgrade. You can easily double the baseline price by maxing everything but that value will mostly be lost if you were to re-sell. If you look at ebay for completed listings on 2008 24" imacs, they all tend to go for similar money. Those expensive upgrades that doubled the price four years ago, seem quite insignificant today.