A time-modulated Hawkes process to model the spread of COVID-19 and the impact of countermeasures