Gravar-mail: Generalized Semiparametric Varying-Coefficient Model for Longitudinal Data with Applications to Adaptive Treatment Randomizations