Four Iranian men who were arrested on suspicion of preparing a terror attack have been released from custody.