Rihanna to Guest Judge on ‘The X-Factor’