The helpers are unused outside of tests and redundant with the existing bool read(std::string_view raw);. Fix both issues by removing them. Also, simplify the tests code by removing a std::string constructor where possible.
Backport of core#28168.
Depends on D16295.