Judge and mentor L.A. Reid is leaving 'The X Factor'