Ref #1888 (step 4)
added string:split added string:trim added a default value for wrap width added function comments added tests for all string functions (the tests for string:split will be commented out until we remove the competing implementation in gui/load-screen
refactored and improved from the implementation in quickfort's dialog.lua