In sysctl_handle_bool(), if the output buffer (for the old value) has
room for exactly 4 bytes (sizeof(int)), then output the current boolean
value as an integer rather than a 'uint8_t'. Conversely, if 4 bytes
exactly remain in the input buffer (for the new value), treat them as an
integer and derive the new boolean value from it.
Doing so allows to convert existing integer syscstl knobs that are
interpreted as a boolean into true boolean ones while staying
backwards-compatible.
There is no drawback in doing that as no code currently uses
sysctl_handle_bool() as part of a series of calls to sysctl_handle_*()
functions for (de)serialization of some compound structure. If that
case ever materializes, it can be easily solved, e.g., by creating
a sysctl_handle_bool_strict() variant.
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation