Risk factors for SARS-CoV-2 infection, hospitalisation, and death in Catalonia, Spain: a population-based cross-sectional study