CRM-20420 - PDFLetterCommon - Record attachments (in mode "combined-attached")
If the setting `recordGeneratedLetters` is `combined-attached`, then we
should capture the content of the generated file and save it to an
attachment.
Note: There are several different ways generating files (eg HTML=>PDF,
HTML=>docx/ODT, or docx/ODT template file). Ideally, these would support
common set of options for directing output (to a file, string, or console).
In fact, some do, and all the underlying libraries do... but the
middle-logic only handles the console consistently. We use output buffering
(ob_start()) to capture the content and save it to a file.