The German foreign minister paid a visit to Iran, to expand diplomatic and economic relationships. But the past intruded, as demonstrators assailed the German diplomat, demanding that Germany pay compensation for supplying Iraq with the means to make chemical weapons and use them against Iran in the 1980s.