sd-device: allow to read sysattr which contains embedded NUL
This effectively reverts the commit 2a394d0bf2f0afd8b9ed5faeb33f23459e3c6504.
But drop trailing '\r' of the read value, as sd_device_set_sysattr_value() drops it.
Fixes #20025.
(cherry picked from commit 70160c6eeee07ac6aa817826d13e8eff9563ce1e)