Quasiclassical modeling of cavity quantum electrodynamics