Improve StringUtil::trim()
The previous regular expression for trim at the end
(introduced in
73d8b58f6a2ed1c9f49684e867d2b42a8cd82920) show bad
performance for huge strings containing little amounts of white space.
The version before that one blew the C stack for huge strings containing
huge amounts of contiguous white space.
Matching for the Unicode property of being a whitespace is both faster
(less backtracking for alternations) *and* more correct (because it
matches many more types of white space).
win-win