api: add argument "flags" in function hdata_new_list
relay: check pointers received in hdata command to prevent crashes with bad pointers (WeeChat protocol)
relay: fix crash when closing relay buffers (closes #57, closes #78)

A flag "closing" has been added in buffers. It is set to 1 when the buffer
is closing, and then no more printf is allowed in the buffer (a message
printed on relay buffer was causing a crash when it is closed).