Semiclassical modeling of coupled quantum-dot–cavity systems: From polaritonlike dynamics to Rabi oscillations