Buhari, remembered for an anti-corruption drive and faltering economy, leaves behind a contentious legacy.