Charge exchange and energy dissipation of particles interacting with metal surfaces