build: change THORIUM_DEBUG to CONFIG_DEBUG

Signed-off-by: Sébastien Boisvert <boisvert@anl.gov>
build: improve the option CONFIG_LTTNG

Move everything related to building with LTTng
in the build system itself.

Signed-off-by: Sébastien Boisvert <boisvert@anl.gov>
build: fix minimal build

Without mpicc, the build system fails to find -lrt and -lpthread.
This fixes that issue.

$ make -j CONFIG_ZLIB=n CONFIG_MPI=n CC=cc
$ ldd performance/latency_probe/latency_probe
	linux-vdso.so.1 =>  (0x00007fff830de000)
	libm.so.6 => /lib64/libm.so.6 (0x0000003f19a00000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003f1a200000)
	librt.so.1 => /lib64/librt.so.1 (0x0000003f1aa00000)
	libc.so.6 => /lib64/libc.so.6 (0x0000003f19600000)
	/lib64/ld-linux-x86-64.so.2 (0x0000003f19200000)

Signed-off-by: Sébastien Boisvert <boisvert@anl.gov>
build: add option CONFIG_CLOCK_GETTIME=n

The new minimal build only needs libm, libc, and libpthread.

linux-vdso and ld-linux-x86-64 are specific to the Linux operating system
and/or to the architecture. vdso (vsyscall) is used to invoke some system
calls directly from userspace for better performance. ld-linux is used
to load shared libraries.

$ make -j CONFIG_CLOCK_GETTIME=n CONFIG_MPI=n CONFIG_ZLIB=n CC=cc
$ ldd performance/latency_probe/latency_probe
        linux-vdso.so.1 =>  (0x00007fffc7bff000)
        libm.so.6 => /lib64/libm.so.6 (0x0000003f19a00000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003f1a200000)
        libc.so.6 => /lib64/libc.so.6 (0x0000003f19600000)
        /lib64/ld-linux-x86-64.so.2 (0x0000003f19200000)

Link: http://linux.die.net/man/8/ld-linux
Link: http://man7.org/linux/man-pages/man7/vdso.7.html
Link: http://stackoverflow.com/questions/19938324/what-are-vdso-and-vsyscall
Signed-off-by: Sébastien Boisvert <boisvert@anl.gov>