Don't call wrapped atrace_begin if tag is disabled

Gating the binding call on tag status lets us avoid constructing CString
and spending a lot of time when tracing is disabled.

We'll use this optimization when adding other wrapper methods that
accept strings.

Change of atrace_begin time with tracing off: 100 ns -> 6 ns

Test: atest
Test: Manually run libatrace_rust_benchmark
Test: Manually run libatrace_rust_example and collect a trace with
      Perfetto.

Bug: 289989828
Change-Id: Id73cdfa887da9b5d2142154d3be5f88872108675
2 files changed