Extract OutputFormat to FileFormat for ingest re-use

@markhibberd Created this as a separate PR just to make it easier to see/comment on what's going on.

I've renamed `OutputFormat` to `FileFormat` (I think I prefer that anyway), and `EscapedAs` to `TextEscaping`. Let me know if that's OK.
> Formatting fail or intentional?

IntelliJ