attribute: Implement wrappers for Attribute

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
event: Add support for setting event attributes

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
event: Fix the attribute reallocation in _event_set()

Allocate one more than event->n_attributes, so at the beginning when
there are zero elements, we still allocate one.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
event: Add support for setting tags

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
client: Do not close an unconnected socket

Check that the socket to disconnect from is not -1, and bail out early
if it is. This avoids us calling close unnecessarily.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
event: Code cleanup

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>