Theoretical studies of molecules on metal surfaces I. Site stability and vibrational frequencies of CO on Ni(111), Ni(110) and Ni(110)