that doesn't mean that the relationship between Iran and these organizations is as developed or close as their relationship with Hezbollah
Within that statement is the obvious seed of conflation.
ME politics are a complex blend of geo-political and religious aspirations. Understanding that leads one to conclude there may be many anti-intuitive affiliations and alliances. Iran is generally at the cent of these complexities.
I think when viewed from a religious perspective the relationship between Iran and Hamas becomes clear. The relationship is not like the Iranian-Hezbullah alliance as Hamas is rather independent of Tehran. They will accept support but not take directions from Iran. This is demonstrated when Hamas split from Iran on the Syrian issue. Iran supported the Shiite al-Assad government and Hamas sided with the Sunni rebellion. However as Hamas lost financial support they relented and now once again are accepting aid from Iran. One would be hard pressed to conclude there is a "close" relationship between Iran and Hamas. Of course the original reasons for Iran to even support Hamas remain the same, European interlopers in Muslim lands and American anti-Iranian interests.
The last is important as it apparently drives the political reactions of the Iranians. Best said as the old cliche, just because you are paranoid does not mean someone is not out to get you. Iran is paranoid about American interests and justifiably so. After the revolution, America sent Iraq to overturn the Ayatollah and failed. (I am of course taking some liberties with that statement as it requires a long argument to support that conclusion). And on until now Mr Trump says the US will not leave the sovereign nation of Iraq, suggesting the US is poised for an invasion on the border of Iran.
The AQ citation is more than a bit misleading to the point it grossly mischaracterizes the actual relationship.
A West Point study based on documents uncovered in Osama bin Laden's compound in Abbottabad found that the Iran-al Qaeda "relationship is not one of alliance, but of indirect and unpleasant negotiations over the release of detained jihadis and their families, including members of bin Laden's family." According to longtime Central Intelligence Agency (CIA) analyst Bruce Riedel: "Rather than being secretly in bed with each other as some have argued, al Qaeda had a fairly hostile relationship with the Iranian regime. To get members of his family out of Iran, for example of bin Laden had an Iranian diplomat kidnapped and then traded. The Iranians released some of his family members in the deal but then double-crossed al Qaeda by not letting one of his daughters, Fatima, free."
This is an example of a relationship which is not a relationship but more like a tense on-meeting. The religious tension is/was apparently paramount and determined the intimacy of the relationship. I suspect this was more the idea, as long as you are not trying to overthrow the Iranian government you have safe but watchful passage, but as soon as you start eyeing Iran, you are not welcome. Which leads to the Taliban.
I like the citation from FDD's Longwar. It is a known neo-con clearinghouse for uptodate info on terrorism. I think I actually communicated with Roggio when he was engaged in Iraq trying to spread fake info on the war. But understanding the perspective it became clear the editorial was more subjective than informative. This is again a case of Iranian paranoia of America trying to encamp on Iran's southern border in preparation of an invasion. Iran would militarily support the Taliban to keep Americans out of Afghanistan but by the same token would not allow the Taliban to make political inroads in Iran. It the religious thing.
The idea that Iran won't work with, support, protect, and enable Sunni terror groups for common goals or enable each other in attacking the west is belied by (at this point) more than two decades of them doing precisely that.
I think your statement while in the whole is correct, I also believe you have too strongly stated it. Iran is in genuine fear the US intends to overthrow the Ayatollah. Nothing says it better than Mr Trump assassinating Gen Suliemani. That Iran would not try to protect itself from US aggression would be tantamount to political and sovereign negligence. This is not the same as a general hatred of the West as in a clash of civilizations. It is a reaction to US behavior toward Iran. And ultimately the top layer is the religious contention between Sunnis and Shias.
The recipe for inherent conflict is two non arab states, Israel and Iran, for the most part surrounded by Sunni Arabs.