Iran has launched a major security crackdown, claiming to dismantle a foreign-linked spy network with at least 50 arrests.