Relating the total domination number and the annihilation number of cactus graphs and block graphs