Add specs for PG::TextEncoder::CopyRow. Refacture pg_ensure_str_capa() to avoid duplicated code.