Calculation of stellar electron-capture cross sections on nuclei based on microscopic Skyrme functionals