perf tools: Add kbuild support into Makefile.kbuild

Adding kbuild support into Makefile.kbuild. The 'legacy'
Makefile still stays untouched as it was.

It's possible to use kbuild by running 'make -f Makefile.kbuild'
with any option supported by 'legacy' Makefile.

We now have 2 config files:
  '.config' - user configured setup
  '.config-detected' - system detected setup

The '.config-detected' affects '.config' and if there's
configured feature in '.config' which was not detected
it is automatically disabled.

The '.config-detected' is re/created if:
  - there's no '.config-detected'
  - '.config' was changed

In a cleaned tree the perf is built with 'allyesconfig'
having disabled all non-detected features, just as it is
done now.

You can change '.config' via:
  make -f Makefile.kbuild menuconfig

There's difference for O=DIR build. The DIR is populated
based on kernel source tree, so the final binary is created
under DIR/tools/perf.

Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Michal Marek <mmarek@suse.cz>
Cc: linux-kbuild@vger.kernel.org
Cc: Stephane Eranian <eranian@google.com>
perf kbuild: fix recursive invocation of config/features-checks
perf kbuild: store in config-detected missing variables (libdir, ...)
perf kbuild: remove useless #ifdef directives
perf kbuild: fix a link issue if BUILTIN_TRACE is disabled
perf kbuild: add missing files and missing flags in Kbuild files
perf kbuild: update kbuild files according to last changes
perf kbuild: remove legacy slang-related build variables

Remove NO_SLANG (replaced by CONFIG_LIBSLANG)
Remove HAVE_SLANG_SUPPORT from CFLAGS (replaced by CONFIG_LIBSLANG)
perf kbuild: remove legacy libaudit-related build variables

Remove NO_LIBAUDIT (replaced by CONFIG_LIBAUDIT)
Remove HAVE_LIBAUDIT_SUPPORT from CFLAGS (replaced by CONFIG_LIBAUDIT)
perf kbuild: remove legacy libgtk2-related build variables

Remove NO_GTK2 (replaced by CONFIG_LIBGTK2 or CONFIG_GTK2)
Remove HAVE_GTK2_SUPPORT from CFLAGS (replaced by CONFIG_LIBGTK2)
Remove HAVE_GTK_INFO_BAR_SUPPORT from CFLAGS (replaced by
CONFIG_LIBGTK2_INFOBAR)
perf kbuild: remove legacy libperl-related build variables

Remove NO_LIBPERL (replaced by CONFIG_LIBPERL)
perf kbuild: remove legacy timerfd-related build variable

Remove HAVE_TIMERFD_SUPPORT (replaced by CONFIG_TIMERFD)
perf kbuild: remove legacy demangle-related build variables

Remove NO_DEMANGLE (replaced by CONFIG_DEMANGLE)
Remove HAVE_LIBBFD_SUPPORT (replaced by CONFIG_LIBBFD)
Remove HAVE_CPLUS_DEMANGLE_SUPPORT (replaced by CONFIG_LIBIBERTY_ONLY)
perf kbuild: remove legacy on_exit-related build variable

Remove HAVE_ON_EXIT_SUPPORT (replaced by CONFIG_ON_EXIT)
perf kbuild: remove legacy backtrace-related build variable

Remove HAVE_BACKTRACE_SUPPORT (replaced by CONFIG_BACKTRACE)
perf kbuild: remove legacy numa-related build variable

Remove HAVE_LIBNUMA_SUPPORT (replaced by CONFIG_LIBNUMA)
perf kbuild: remove legacy bionic-related build variable

Remove NO_BIONIC (replaced by CONFIG_BIONIC)
perf kbuild: remove legacy libelf-related build variables (1st part)

Remove NO_LIBELF (replaced by CONFIG_LIBELF)
perf kbuild: remove legacy libelf-related build variables (2nd part)

Remove HAVE_LIBELF_SUPPORT (replaced by CONFIG_LIBELF)
Remove HAVE_LIBELF_MMAP_SUPPORT (replaced by CONFIG_LIBELF_MMAP)
Remove HAVE_LIBELF_GETPHDRNUM__SUPPORT (replaced by
CONFIG_LIBELF_GETPHDRNUM_)
perf kbuild: remove legacy libdwarf-related build variables

Remove NO_DWARF (replaced by CONFIG_LIBDWARF)
Remove HAVE_DWARF_SUPPORT (replaced by CONFIG_LIBDWARF)