Allow tracepoint providers to be compiled with g++

Move enumeration definition out of lttng_ust_lib_ring_buffer_config to
make them visible at global scope for C++ compilers.

Modify designated initializers: reordering initializers, add missing
initializers, reformat nested initializers, in order to make g++
compile.

Relevant discussion:

> So each field need to be listed ? We usually don't put NULL
> initialization for structures that are always in zero-initialized
> memory. (coding style)

This is related to a known issue of g++:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55606 (Bug 55606 - sorry,
unimplemented: non-trivial designated initializers not supported).

g++'s 'trivial designated initializers' means no out-of-order
initialization, no missing
initialization (except the fields on the tail of a struct), and nested
initialization should be done in the form {.foo = {.bar = 1}} instead of
{.foo.bar = 1}. That's why I made such modification.

> Are those changes also compatible with the LLVM c++ compiler ?
Actually, clang++ have designated initializers better supported than g++.
All the modification about designated initializers are not required for
clang++. No need to add NULL initialization, reorder initializations or
change {.foo.bar = 1} into {.foo = {.bar = 1}}. These (ugly) hacks are just
to make g++ happy.

[ Updates done by Mathieu Desnoyers to fix merge conflicts. Updated
  README. ]

Fixes #338

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Move include directive from CFLAGS to LOCAL_CPPFLAGS in examples' Makefiles

The use of LOCAL_* flags and override directives ensures that the build
succeeds even if the user explicitly overrides CFLAGS/CPPFLAGS/LDFLAGS.

Fixes #537

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix: liblttng-ust process startup hang when sessiond is stopped

Ensure the listener thread owns socket and notify_socket, so they don't
have to hold the ust_lock() while connecting to the sessiond and reading
from this socket.

Therefore, after process fork, we can safely cleanup those retources,
because the thread has been removed by the operating system. On exit,
however, let the OS teardown those sockets, so exit path does not race
with the listener thread.

Fixes #545

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
zmalloc: attribute always_inline

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>