When fuzzing the base58 functions I noticed that `DecodeBase58(const std::string& str, …)` is perhaps a bit too liberal in what input it accepts when decoding.

I naïvely assumed that `DecodeBase58(const std::string& str, …)` would return `false` when passing it a `str` which contains at least one character that is not any of the base58 characters (all alphanumeric characters except for "0", "I", "O", and "l") or the whitespace characters.

That is not the case:
* `str` contains `good` → `DecodeBase58(const std::string& str, …) == true` (as expected)
* `str` contains `bad0IOl` → `DecodeBase58(const std::string& str, …) == false` (as expected)
* `str` contains `good\x00bad0IOl` → `DecodeBase58(const std::string& str, …) == true`(!)

The reason is that `DecodeBase58(const std::string& str, …)` calls `DecodeBase58(const char* psz, …)` which will only consider the string up to the first `\x00`.
{
    return strprintf("%d", n);
}
std::string itostr(int n)
{
    return strprintf("%d", n);
}
int64_t atoi64(const char* psz)
{
#ifdef _MSC_VER
    return _atoi64(psz);
#else
    return strtoll(psz, nullptr, 10);
#endif
}
int64_t atoi64(const std::string& str)
{
#ifdef _MSC_VER
    return _atoi64(str.c_str());
#else
    return strtoll(str.c_str(), nullptr, 10);
#endif
}
int atoi(const std::string& str)