truss: Make control message header parsing more robust
print_cmsg() was assuming that the control message chain is well-formed,
but that isn't necessarily the case for sendmsg(2). In particular, if
cmsg_len is zero, print_cmsg() will loop forever. Check for truncated
headers and try to recover if possible.
Reviewed by: tuexen
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 4b0c6fa0dceac797f43dffd5642c1aed727c6ea6)