Electron dynamics and level broadening in slow atomic interactions with metal surfaces and thin metallic films