I added a brief clarification in a comment to the question. Should this have been edited into the original question?
Yes, that's right. Questions should, as far as possible stand on their own, so people can answer the question without having to read through the comments too.
The primary purpose of comments are to help make questions and answers better, so ideally if someone asks for clarification in a comment, you would edit that information into the question (or answer) and the commenter would then tidy up (remove) their comment later. That way, once all of the comments on a question (or answer) have been resolved, the question (or answer) would be left with no comments to distract from it.
when I received the first answer, I realized that the wording of my question caused the answer-er to make an unintended assumption about the question, which I then clarified in a comment to the answer. Should this clarification have been immediately edited into the original question?
Again, yes. What I would do is edit the question to provide clarification and prevent future answerers from making the same erroneous assumptions, and then comment on the answer to say that the question has been updated.
If the answer gets updated to answer the revised question, the comment can be tidied up (deleted) since it is no longer relevant.
If the answerer doesn't edit the answer to update it to the revised question, it would be reasonable to leave the comment there as a pointer to the fact that the question has changed since the answer was created.
I went ahead and edited the question to include all the clarifications. But now, the first answer is out-of-date and does not address the new question. I've maintained my vote in favor of the first answer because even though it didn't solve my problem, it was helpful in causing me to view my question more carefully for points I had missed. Is this a good idea?
That's just how it should work. If you look at the tooltip text when you hover over the up-vote button, it says "This answer is useful", not "This answer is correct". An answer can be useful even if it doesn't fully answer the question posed, it may, as appears to be the case here, still be a good stepping stone on the way to a full answer.
The fact that the answer doesn't quite fit the revised question isn't really a problem, as long as that fact is obvious. One of the great strengths of Stack Exchange is that it does support and promote this collaborative way of asking and answering question. You can see the full revision history of every question or answer at any time so you can always go back and see how questions and answers have evolved over time.
Of course this shouldn't be abused, you don't want people accusing you of pulling a bait and switch, but the situation you describe here is expected and is very common on Stack Exchange.