Voting has ended in Madagascar’s presidential election after a turbulent campaign period marred by boycotts and allegations of election irregularities.