A Ukrainian official who was recently named one of the country’s top prosecutors secretly acted as a key go-between in Rudy Giuliani’s backchannel campaign to dig up information in the country that could damage U.S. President Donald J. Trump’s political rivals.