BBC chief quits over 'shoddy journalism' failures