Optimism as a protective factor against the psychological impact of COVID-19 pandemic through its effects on perceived stress and infection stress anticipation