Vicinage effects in energy loss and electron emission during grazing scattering of heavy molecular ions from a solid surface