Understanding the Electron-Doping Mechanism in Potassium-Intercalated Single-Walled Carbon Nanotubes