Lock devstat updates in block backend to make it usable.  Polish lock names.

MFC after:	2 weeks
Sponsored by:	iXsystems, Inc.

(cherry picked from commit 52ca2df2709a7a01c7947959bffdb7d10a82c926)

Conflicts:
	sys/cam/ctl/ctl_backend_block.c
Add READ BUFFER and improve WRITE BUFFER SCSI commands support.

This gives some use to 512KB per-LUN buffers, allocated for Copan-specific
processor code and not used.  It allows, for example, to test transport
performance and/or correctness without accessing the media, as supported
by Linux version of sg3_utils.

MFC after:	2 weeks

(cherry picked from commit 36b6236db2d8d8fbfada389c6f96e0ca25654fdb)
Allow MODE SENSE commands through Write Exclusive persistent reservation,
as required by SPC-4.

Report that fact in persistent reservation capabilities.

MFC after:	2 weeks

(cherry picked from commit 3fa0a3d2c654598d2bf79da4ab050939228972be)
Simplify statistics calculation.

Instead of trying to guess size of disk I/O operations (it just won't work
that way for newly added commands, and is equal to data move size for old
ones), account data move traffic.  If disk I/Os are that interesting, then
backends have to account and provide that information.

Block backend already exports the information about disk I/Os via devstat,
so having it here too is excessive.

MFC after:	2 weeks

(cherry picked from commit 3b1508e47147f9f136282646bb4b3601c7e9fd45)
Remove odd practice of inverting error codes.

-EPERM is equal to ERESTART, returning which from ioctl() handler causes
infinite syscall restart.

MFC after:	2 weeks

(cherry picked from commit be666c404b45c8ce1578da921898d27fa32a0d61)
Use separate memory type M_CTLIO for I/Os.

CTL allocate large amount of RAM.  This change give some more stats.

MFC after:	2 weeks

(cherry picked from commit 83d76f3c4680ca1225c7fd224c1b8ec4ab052b34)
Improve readability of XML generated by CTL_LUN_LIST.

(cherry picked from commit 1aa291ed887e10585424013a2e6ff0e16175ca01)
Do not return statuses for aborted iSCSI commands.

(cherry picked from commit a19a69842c309579c66ef5fa8db053d307ae02df)
Fix use-after-free on XPT_RESET_BUS.

That command is not queued, so does not use later status update.

(cherry picked from commit 6c91ce3da6785fed69c0921688da0225da95732d)
Fix build on stable/9.