Add tests to make sure lookup methods fail on std::string parameters with embedded NUL characters
This is a backport of Core PR17754 [2/3]
https://github.com/bitcoin/bitcoin/pull/17754/commits/fefb9165f23fe9d10ad092ec31715f906e0d2ee7
Depends on D8684