Responses to these specific circumstances:
Generally the earlier answers should be your first choices and the latter options are for increasingly difficult individuals.
A woman (who is married) told me directly that she feels a man who
prefers singledom is not "normal"
Option 1: ask her to explain herself. Ask "Why do you think it isn't normal? What's wrong with prefering being single?". With any luck, getting her to express her opinion fully will highlight the flaws with it.
Option 2: ask why it matters to her. Ask "You're happily married, so how exactly does my singledom affect you?". Again, with any luck she will realise she is being judgemental.
Option 3: "Since when is it down to you to decide what is and isn't normal?"
My supervisor (PI) told a female co-worker not to talk to me (she
revealed this to me the other day and asked why he would say this).
You don't explicitly state how/why this relates to the singledom issue.
Are you sure it's related?
Are you sure it's not because said supervisor thinks the opposite - that you are interested in said co-worker, and he is also interrested and thus sees you as faux competition?
If this was related, document the issue (perhaps don't mention which coworker told you unless said coworker would be willing to back you up on the matter) and do not take it further unless the issue becomes repetative and you have some form of proof or more witnesses prepared to come to your defence.
Really that's a workplace issue, not an interpersonal issue.
A woman whose advances I purposely ignored is accusing me of being
gay.
As other answers have said, this woman is rationalising the rejection because the idea that you simply aren't interrested in her is too much to bear.
Option 1: "If I was gay, I assure you I would not be hiding the fact because there is nothing wrong with being gay. However I am not gay, I am straight. I am just not interested in long-term relationships."
Option 2: question her motives. E.g. "Is that it then? I'm not interested in you, so the only explanation is that I must be gay? I'm sorry, but that sounds a little bit irrational to me".
Option 3: question her accusation. E.g. "I am categorically not gay, but if I were, would you have a problem with that? Do you have a problem with gay men?".
General suggestions:
Don't panic. Remain calm.
In the case of work-related issues, don't rush to HR, but document the incident somehow and if others are present, make it clear that your love life or lack thereof is not your colleages business and should not have an impact on your work life. State that your personal life is personal and you choose to keep it to yourself.
In the case of more casual digs, turn the person's comments back on them by questioning their belief. Try to make them justify themselves. Most likely they will want to change the topic because they will not want to be questioned on the matter.
Other stances:
Perhaps consider maintaining the notion that you don't date coworkers and you don't discuss your love life at work. As long as you enforce that rule it acts as a facade for what your love life is actually like. Coworkers will never know whether you're seeing someone or not and you can fall back on the rule as a way to deter romantically interested coworkers.
Regarding myself:
I am in a similar position. I'm not in a heavily female environment and haven't been for some years, but I remain single purely because I have been single for so long that I've gotten used to the situation and have grown content with the way things are. Likewise, I don't find the stress that comes with relationships very attractive and have been accused of being gay in the past, at a time when it was less socially acceptable to be gay. (In hindsight I find it quite laughable.)