Problem: string buffers aren't NULL checked

Have found some places where memory is allocated and not NULL checked.
I have not touched the auto generated engine for zgossip which is also not checking for NULL pointers from strdup.

Tests pass locally.
No point in asserting on string and then checking string. Indeed, changing API to allow null strings is probably bogus and does not fix any well identified problem. Also, please don't make such changes on the fly mixed into other changes. One commit should fix one identified problem.