Testing cross-phenotype effects of rare variants in longitudinal studies of complex traits