ASTContext: Refactor implicit record creation

Tidy up built-in record creation to reduce code duplication.

Continuation of r197336.