A density matrix-based quasienergy formulation of Kohn-Sham density functional response theory using perturbation- and time-dependent basis sets