Chemisorption and magnetism: CO on Ni clusters