perf hists browser: Fix callchain print bug on TUI

Currently perf report -g graph option doesn't work as expected and
always work as same as -g fractal.  This was a bug during recent
callchain print code cleanup.

Before:
  $ perf report -g graph

    Children      Self  Command  Shared Object      Symbol
  ================================================================
  -   56.19%    35.41%  sleep    [kernel.kallsyms]  [k] page_fault
     - page_fault
        + 63.02% _dl_relocate_object
        + 36.98% clear_user

After:
    Children      Self  Command  Shared Object      Symbol
  ================================================================
  -   56.19%    35.41%  sleep    [kernel.kallsyms]  [k] page_fault
     - page_fault
        + 35.41% _dl_relocate_object
        + 20.78% clear_user

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
perf tools: Move callchain config from record_opts to callchain_param

So that all callchain config parameters can be read/written to a single place.
It's a preparation to consolidate handling of all callchain options.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
perf tools: Move some callchain parser functions to callchain.c

And rename record_callchain_parse() to parse_callchain_record_opt() in
accordance to parse_callchain_report_opt().

Signek-off-by: Namhyung Kim <namhyung@kernel.org>
perf tools: Introduce perf_callchain_config()

This patch adds support for following config options to ~/.perfconfig file.

  [call-graph]
    record-mode = dwarf
    dump-size = 8192
    print-type = fractal
    order = callee
    threshold = 0.5
    print-limit = 128
    sort-key = function

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
perf tools: Convert {record,top}.call-graph option to call-graph.record-mode

So that it'll be passed to perf_callchain_config().

Signed-off-by: Namhyung Kim <namhyung@kernel.org>