Shell: Add "perf stat" command for efficient tracepoint counts

A long time ago, around commit 092f28c6258d5e56479ffeba6fd6ce056c21ea8c,
Avi added a cool feature for efficiently counting the number of times
a tracepoint was reached without actually logging the tracepoint.
This feature could be used, for example, to efficiently count the frequency
of context switches and other events.

The way this worked was to maintain for a tracepoint we want to count a
per-cpu counter, which we can efficiently update when the tracepoint is
reached - without any locking or atomic operations; We only sum up the
per-cpu counters when we want to read the counter. The idea is that we can
count even very-high-frequency events, without noticably effecting the
workload's performance.

In today's code, we still have the per-cpu-counter feature in the code
(core/per-cpu-counter.cc), as well as (Java) code for enabling counting
of a particular tracepoint (java/jni/tracepoint.cc, java/.../Tracepoint.java)
but in the code churn we lost the ability to actually run this code from
the CLI, which made it unreachable.

So this patch adds a "perf stat" command to our shell. Its parameter is a
comma-separated list of tracepoint names (run "perf list" for the list of
available tracepoints), and what it does is to show the number of times that
each tracepoint fired in each 1-second interval - until ^C is used to stop
this endless loop.

As an example, consider running both memcached and the shell, using
"make image=memcached,mgmt.shell". We start perf stat, and then start
to send requests to memcached:

[/]% perf stat sched_switch,sched_preempt,timer_fired,msix_interrupt
 sched_switch sched_preempt timer_fired msix_interrupt
           86            40          42              0
           86            40          42              0
           92            41          43              0
        87473         28871          47          29850
       120262         42042          42          43304
       126371         43958          42          45265
       123620         42886          42          44220
^C
[/]%

Note that each of these numbers (e.g., 123620) are events-per-second.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>