Spectroscopic and molecular dynamics studies of solvation of cyanomethane and cyanide ions