Refactor schema_matching.cpp (#20549)
Summary:
It was kind of hard to read through this code so this adds a bunch of comments, no behavior should be changed
](https://our.intern.facebook.com/intern/diff/15499974/)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20549
Pulled By: driazati
Differential Revision: D15499974
fbshipit-source-id: 95bf660c3b2bab1c90a2250696cece68bd1925cc