file-api: support exporting file set information

This includes listing the filesets themselves as well as which file set
(if any) each source file is associated with.

Fixes: #24128
58 files changed