Use of antibiotics and factors associated with treatment failure among 152,245 patients with pneumonia treated in the community — a retrospective cohort study