Plasmonic Sensor Based on Interaction between Silver Nanoparticles and Ni2+ or Co2+ in Water