Iran Frees 40 Detained During Anti-U.S. Rally