Move is_valid_utf8() subroutine to MediaWords::Util::Text because it is potentially useful elsewhere (e.g. in the CoreNLP branch)