Congratulations on your purchase plans. Here are a few quick reactions to some of your questions.
If you're looking for something "close to DC and/or public transportation lines," and/or if you think that these factors will contribute to a good resale value (and I personally agree that proximity to DC and public transportation will help resale values), then I'd personally look closer in than Herndon, and maybe even Centreville. Top choice by far, with those criteria, would be a townhome near the Vienna Metro. That's closer in, it's close to Metro, and it's also very close to I-66, as well as Route 50.
Broadly speaking, a single family home might hold value better than a townhome, though that really depends on location, condition, and other factors. Stay away from condos (technically, "condo" is a legal term, and townhouses can be condos, but I'm referring to glorified apartments).
You'll find more affordable property the farther out you go, but that's both a factor of general distance and a reflection of greater price declines for some of the farther out properties. Still, I'd look closer in.
Your time frame of 5 years historically is pretty good. However, I'm not sure that we'll be completely out of the real estate turmoil in 5 years. There are another couple of years of foreclosures on the horizon (despite Bush's proposal). Real estate is cyclical in any case, but the investors I know are looking more at a 7 year time line in this area (and a 10 year time line in harder-hit areas, like California). Don't get me wrong: this is a great time to buy. But you want to buy where prices are, and will remain, pretty firm...not where they may go down another 15-30% or more.
One other thought along those lines: although right now you're weighing fairly new (10 year old) townhomes verus somewhat older (25 year old) townhomes, that disparity/gap will narrow an awful lot even in 5 years...and narrow further in 7 or 10. Right now, the old townhome is 2.5 times as old as the new one. In 10 years, they'll be 20 and 35 years old, respectively, a much smaller relative gap. So, don't worry too much about age.
Also, go to a good mortgage broker right now and find out what you can afford. It doesn't mean you have to spend that much (if, for instance, he/she says you can afford well over your $300,000 budget), but you need to know.
Your final question: How can you compare the variety of choices to each other? One way is to conduct a very narrow search in a couple of the different zip codes you're considering. For example, find out just what $300,000 will buy. Search by zip code, 3 (or more bedrooms), 2 (or more) baths, both single family homes and townhouses, in a narrow price range--say $295,000-$315,000. That'll give you an idea of what's available at those prices in those areas. That'll be your initial basis of comparison.
Take those results, factor in input from the mortgage broker, look at resale patterns in those respective neighborhoods (a Realtor can provide that information easily), check out the neighborhoods to see if any call out to you, and develop your strategy from that.
I'm a Realtor (as well as a real estate investor), and have lived in Northern Virginia for decades. Please feel free to contact me if you need any further help or information.
Solutions 3D LLC
Realtor with Long& Foster