Fix printing non-terminated strings in devlist XML.

MFC after:	1 week

(cherry picked from commit 0963d8042b3129788a04f3b99596ffeef457dc3f)
(cherry picked from commit a53b7dcbd6a213cf3a8d71660e9878a0ab4b099b)
Implement better handling for ENOSPC error for both CTL and CAM.

This makes VMWare VAAI Thin Provisioning Stun primitive activate, pausing
the virtual machine, when backing storage (ZFS pool) is getting overflowed.

MFC after:	1 week
Sponsored by:	iXsystems, Inc.
Ticket:		#6468

(cherry picked from commit e1805defee550f3ab4638c681803c6b7dd62e266)
(cherry picked from commit ad7497e772a7a69197341501ac6c4acf3f78eb1c)