Moved description and tip generation to function

This would allow plugins to easily generate the necessary HTML for the
tooltips and field descriptions when implementing their own custom
setting field types.
Merge pull request #6375 from dominic-p/settings-desc

Moved description and tip generation to a separate method