[expression] implement a wordwrap function (feature request #9412)

(see pull request 1181 for background: https://github.com/qgis/QGIS/pull/1181)

Adds a wordwrap() function to the expression engine.