Fix issues reported by Coverity

Coverity reported a handful of bugs, which is a very good track record over libiscsi's ~30000 lines of code.  Most of them are cosmetic or are only a problem with malicious iSCSI targets. Others are unchecked malloc failures. This series of patches fixes them all.