Time-resolved analysis of Vernier selection dynamics in coupled-cavity terahertz quantum-cascade lasers