fabrics: Handle space-padded TRSVCID and TRADDR fields
The TRSVCID and TRADDR fields in the discovery log page are defined
as ASCII strings, which according to the NVMe standard means they
should be space-padded rather than NUL-terminated.
The current nvme-cli code will print all the spaces and possibly some
garbage from the next field. For example this causes "connect-all"
to write strings that get rejected with "malformed IP address passed."
Fix this by only writing the contents of these fields until the last
non-space character, and limiting the length to the size of the field.
Signed-off-by: Roland Dreier <roland@purestorage.com>