A framework for reconstructing SARS-CoV-2 transmission dynamics using excess mortality data