netbase: Use .data() instead of .c_str() on binary string

`.c_str()` is only guaranteed to return the data up to the first NUL
character.
Remove some unnecessary c_strs() in logging and the GUI

Includes `core: remove unneeded c_str() / Qt: replace c_str() with Qt code`
by P. Kaufmann.
Merge pull request #4868

2c2cc5d Remove some unnecessary c_strs() in logging and the GUI (Philip Kaufmann)
f7d0a86 netbase: Use .data() instead of .c_str() on binary string (Wladimir J. van der Laan)