Coherent manipulation of cold Rydberg atoms near the surface of an atom chip