Tim Davie stepping down as director-general of the BBC comes after several controversies faced by the broadcaster in recent years.