But the legitimacy of Mr. Erdogan’s victory has been tainted by accusations of voter fraud at polling stations across the country  and by an odd series of erratic decisions on the day of the vote by the judges who head the electoral commission.