There is absolutely no problem being gay and going to Iran. There isn't some magic gaydar they can scan you with to discover your nature. I'd recommend not trying to find hookup partners while you're in Iran, but that is different than them just figuring out you're gay and deciding to harm you. Being an American in Iran is a far bigger burden IMHO, because of the required government minders.
Not sure, but possibly, not much? Foreigners are given a pass on many issues. For example, you can easily rent a hotel room with your unmarried partner without a marriage certificate.
"There is absolutely no problem being gay and going to Iran. ", yeah as long as you no one know you are gay. So it's a valid concern because you have to watch what you say / do if you are gay in Iran.
And anyway, that had nothing to do with the original discussion of the having someone to force an opinion on something.