All-Electron Ground-State and Time-Dependent Density Functional Theory: Fast Algorithms and Better Approximations