WARSAW, Poland — Poland’s right-wing president, Andrzej Duda, is fighting for a second term in an election on June 27 that will test whether he was helped by a campaign that depicted LGBT rights as a dangerous “ideology” and an unconventional last-minute reception by President Donald Trump at the White House.