Gravar-mail: Design and analysis of nested case-control studies for recurrent events subject to a terminal event