common/Formatter: add newline to flushed output if m_pretty

This applies to json-pretty and xml-pretty modes.

Signed-off-by: Sage Weil <sage@inktank.com>
common: fix perf_counters unittests for trailing newline in m_pretty

Signed-off-by: Loic Dachary <loic@dachary.org>