Fix concurrency issues while overwriting tracefiles in live

Introduce a new lock to set the abort_flag in the viewer stream. This
lock is nested inside the tracefile rotation of the writer and is
taken before reading the tracefile in the viewer-side. That way, the
viewer-side has just to check this flag to know if it is safe to read.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: document relayd live lock nesting

Signed-off-by: David Goulet <dgoulet@efficios.com>
Add exclusion data to enable-command

Add a new command id for enabling events with exclusions.
Add the exclusion data to the enable-event command structure.
Define a structure for event exclusion data

Define a structure that holds the event exclusion data. The last
data item is a flexible array that contains a variable number
of exclusion names.
Add exclusion data to cmd_enable_event

Add exclusion data to the prototype of cmd_enable_event().
Add exclusions to event_ust_enable_tracepoint

Add exclusion data to prototype of event_ust_enable_tracepoint()
Add event exclusion data to ltt_ust_event structure

Add event exclusion data to ltt_ust_event and ltt_ust_ht_key.
Add exclusion matching logic to trace_ust_ht_match_event
Add exclusion data to trace_ust_create_event

Add exclusion data to the prototype of trace_ust_create_event
Copy exclusion data to the newly created ltt_ust_event structure
Call trace_ust_create_event with exclusion data, wherever possible
Add exclusion data to trace_ust_find_event

Add exclusion data to prototype of trace_ust_find_event()
Add exclusion data to the key structure in trace_ust_find_event()
Call trace_ust_find_event with exclusion data wherever possible
Copy exclusion data in add_unique_ust_event.
Add new error codes for exclusion processing

Add new error codes LTTNG_ERR_EXCLUSION_INVAL and LTTNG_ERR_EXCLUSION_NOMEM
Add handling of LTTNG_ENABLE_EVENT_WITH_EXCLUSION

Add handling of the command LTTNG_ENABLE_EVENT_WITH_EXCLUSION.
The handling of the command is the same as command LTTNG_ENABLE_EVENT,
as the new command is just an extension.

If the command data shows that exclusions and/or filter data will
be following the command structure, read those from the incoming
socket, then forward the filter and exclusion data to
cmd_enable_event().
Collate handling of LTTNG_ENABLE_EVENT_WITH_FILTER

Because the handling of LTTNG_ENABLE_EVENT_WITH_EXCLUSION can
now handle commands of type LTTNG_ENABLE_EVENT_WITH_FILTER,
there's no reason to have the same code appear twice.

Remove the code for LTTNG_ENABLE_EVENT_WITH_FILTER and use the
same code as is used for LTTNG_ENABLE_EVENT_WITH_EXCLUSION.
Add exclusion data to ust_app_event structure

Add exclusion data to ust_app_event and ust_app_ht_key
data structures.
Compare also exclusions in ht_match_ust_app_event

In ht_match_ust_app_event, one of the matching criteria is
that the exclusions must match also. Add the code that checks if
exclusions match.
Copy event exclusion data in add_unique_ust_app_event
Free exclusion data when ust_app_event is deleted
Add exclusion data to find_ust_app_event

Add exclusion data to the prototype of find_ust_app_event
and to wherever it is called.
Copy exclusion data in shadow_copy_event