The BBC's director general and head of news both resigned on Sunday after criticism of the programme.