CFormatter::formatNtext() method can replace newlines with `<p></p>` not just with `<br />` as it was before

Rework of #2035.