However, the heat would bother me even more than the crowds (and I'm from Alabama - I know about heat! but it's WICKED hot in DC mid-summer...)
I'd choose Thanksgiving personally, but if you really want the excitement of being there over the 4th, just take water bottles (or better yet, a camelbak) and be ready for crowds.
We stayed at the Westin in Alexandria. I wouldn't recommend that hotel but Alexandria was GREAT. Some friends just stayed at the Embassy Suites in Alexandria and LOVED it. I would stay there. It is right across the street from the Metro Station, has a free breakfast and suites for rooms. We loved spending the evening in Alexandria, taking the free trolley into Old Town and exploring.
The 1st week of July is insane. Tons and I mean tons of people come to DC for the 4th of July and their magnificent fireworks. And what others have said is 100% correct, it is VERY hot and humid in the city during this time.
IMO, I'd pick Thanksgiving over this time. The weather will be a tad chilly but we've been know to have warmish Novembers too. We've enjoyed DC at this time of year...less humidity, less crowds and more relaxing.
ETA: There is a delicious cupcake shop called 'Red Velvet Cupcakery'. You won't be able to buy just one!