Text this: Using Large Language Models to Automate Data Extraction From Surgical Pathology Reports: Retrospective Cohort Study