Coupling First-Principles Calculations of Electron-Electron and Electron-Phonon Scattering, and Applications to Carbon-Based Nanostructures.