Risk factors for endophthalmitis following cataract surgery: a retrospective case–control study