zfs: Fix SPA sysctl handlers
sbuf_cpy() resets the sbuf state, which is wrong for sbufs allocated by
sbuf_new_for_sysctl(). In particular, this code triggers an assertion
failure in sbuf_clear().
Simplify by just using sysctl_handle_string() for both reading and
setting the tunable.
Apply to FreeBSD directly since this bug causes "sysctl -a" to crash the
kernel.
PR: 276039
Reported by: pho
Reviewed by: mav
Pull Request: https://github.com/openzfs/zfs/pull/15719