Utility: avoid needless copying in String::*trim().

The std::string API is just... awful.