Threshold resummation in pair production