An Italian journalist who was detained in Iran has said she assumed she would have been held much longer, and said her boyfriend’s contact with Elon Musk might have been “fundamental” to her release.