container: new interface

per [0], a public interface is needed for serializing nmsg_message_t
objects into a buffer. libnmsg internally uses a private "container"
interface collecting and serializing nmsg payloads as a group. with
minor changes, promote this internal interface into a documented public
libnmsg interface.

[0] https://lists.farsightsecurity.com/pipermail/nmsg-dev/2013-November/000233.html