Fix: JUL filtering done on the UST level

This is to support enabling all events with different loglevels in two
different sessions.

For this, if any loglevel have been defined, the 'int_loglevel' filter
is added to the UST event. The liblttng-ust-jul library has been
modified to stop filtering loglevel in the agent.

This commit adds two tests, one for a back to back session that are
destroyed and a second one for multi loglevel session.

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: move JUL filter creation to a function

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: Don't report an error if no sessions are found with default options

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Print an error message when a session fails to load

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: Possible out-of-bounds read

Fixes coverity issue 1191757.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: Ressource leak, missing fclose

Fixes coverity issue 1139536.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>