Add support for sample profiling in traceview.

Instead of method instrumentation, allow traceview to periodically
sample stack traces of threads. Disabled by default until we add
gui support for this new mode.

(cherry picked from commit 676f8a527fb62abd39663d55c7d9208f5ca03093)

Change-Id: Ia5d0d57012305a5830d042bcb903a429432b035b
6 files changed