Xcode: Refactor internal source file type selection

Choose the attribute name and file type and send them through a single
attribute generation code path.  Compute the file extension only when
needed.  Leave the file type selection logic indented in a block so it
can be made conditional later.
Xcode: Add source file property to control file type (#14854)

Add source file properties to control Xcode file type attributes:

  XCODE_EXPLICIT_FILE_TYPE   => explicitFileType
  XCODE_LAST_KNOWN_FILE_TYPE => lastKnownFileType

Add a RunCMake.XcodeProject test to verify generated project content.
Merge topic 'xcode-file-type' into next

a339ea65 Xcode: Add source file property to control file type (#14854)
ae80cb9f Xcode: Refactor internal source file type selection