Extended Clapeyron formulae for viscoelasticity problems in the time domain and application to the boundary-condition effect in random composite bodies