stri_trim rewritten in c++. ca 2-3 times faster than version in R which uses stri_sub