Gravar-mail: Persistence time of SIS infections in heterogeneous populations and networks