AST: Convert a SmallPtrSet to a SmallPtrSetImpl in RecordLayoutBuilder

No functionality changed, it just makes the code a little less brittle.