Gravar-mail: Detecting association of rare and common variants by testing an optimally weighted combination of variants with longitudinal data