cmFileCommand: Refactor handling for file(STRINGS ...).

This refactor will make room for encoding support.
cmFileCommand: Add ENCODING option to file(STRINGS ...)

For now, UTF8 encoding support is added.
This addresses issue #10519.
Merge topic 'file-strings-encoding' into next

556635f5 cmFileCommand: Add ENCODING option to file(STRINGS ...)
0397a7d7 cmFileCommand: Refactor handling for file(STRINGS ...).