Refactor out part of format3 builder which handles LookupRecords
Refactor out part of format3 builder which handles LookupRecords

This will allow the same code to be used by other contextual formats (f1, f2)
fonttools/fonttools,googlefonts/fonttools