An algorithm for quantum mechanical finite-nuclear-mass variational calculations of atoms with L=3 using all-electron explicitly correlated Gaussian basis functions