The GAPS programme with HARPS-N at TNG. X. Differential abundances in the XO-2 planet-hosting binary