Add M4 macros helpers to build Java programs

These M4 were taken from the autoconf archive [1].

[1] - http://www.gnu.org/software/autoconf-archive

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Build the liblttng-ust-java library using the new M4 macros

The liblttng-ust-java can now be built without passing paths to
the JDK:

$ ./configure --enable-jni-interface

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
# This is a combination of 4 commits.
# The first commit's message is:
Refactor liblttng-ust-jul in liblttng-ust-agent

This is a major refactor of the initial implementation of the UST JUL
agent. The agent now support the log4j logging backend.

The agent can now be built in three different configurations:

1) Java agent with JUL support:

$ ./configure --enable-java-agent-jul

2) Java agent with Log4j support:

$ export CLASSPATH=$CLASSPATH:/path/to/log4j.jar
$ ./configure --enable-java-agent-log4j

3) Java agent with JUL + Log4j support

$ export CLASSPATH=$CLASSPATH:/path/to/log4j.jar
$ ./configure --enable-java-agent-all

To build the agent with log4j support, make sure that the log4j jar
is in your Java classpath.

The configure script will automatically detect the appropriate Java
binaries to use in order to build the Java agent.

The name of the agent jar file is now "liblttng-ust-agent.jar".
It will be installed in the arch-agnostic "$prefix/share/java" path
e.g: "/usr/share/java".

In order to support older applications using the "org.lttng.ust.jul"
package, a transitional package is built with the same name.

All applications should move to use the "org.lttng.ust.agent" package.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>

# This is the 2nd commit message:

Cleanup: Remove useless getUID private method

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>

# This is the 3rd commit message:

Cleanup: Remove useless null check on root thread object

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>

# This is the 4th commit message:

Cleanup: Remove misleading removeHandlers

The removeHandlers method is no longer necessary since we are attaching
directly to the root logger. Simply remove our handlers by getting the
LogManager singleton.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>