Macky Sall secured a second term against a backdrop of rising opposition discontent.