Ab Initio Molecular Dynamics: Propagating the Density Matrix with Gaussian Orbitals. II. Generalization based on Mass-weighting, Idempotency, Energy Conservation, and Choice of Initial Conditions