Quantum electrodynamics calculation of lepton anomalous magnetic moments: Numerical approach to the perturbation theory of QED