I remember reading about this (Ad Hominem) on Wikipedia in the past and they answer your questions (Q0 and Q1) pretty clearly:
Non-fallacious reasoning
When a statement is challenged by making an ad hominem attack on its author, it is important to draw a distinction between whether the statement in question was an argument or a statement of fact (testimony). In the latter case the issues of the credibility of the person making the statement may be crucial.
So in essence, yes, Ad Hominem is not always invalid just because it's Ad Hominem. If the credibility of the person issuing the statement is of importance to it's conclusion, then Ad Hominem could be entirely valid.
To answer your title question: Have any philosophers argued that ad hominems are sometimes valid? - Yes
Gary N. Curtis, owner of the website: Fallacy Files.org and Philosophy PhD is the source for the Wikipedia quote given above. He states eloquently:
The main thing to keep in mind is the distinction between argumentation and testimony. The whole point of logic is to develop techniques for evaluating the cogency of arguments independently of the arguer's identity. So, ask the question: is the person being criticized arguing or testifying? Are reasons being presented, or must we take the person's word for something? If the person is arguing, the argument should be evaluated on its own merits; if testifying, then credibility is important.