Add size weighting to the script

Add the ability to weight the counts by the total size allocated at that
stack trace.  Also puts the thread/type/size at the top of the stack
trace and fixes a bug that erroneously inserted an additional stack
frame at the base.  Some small code cleanups in the agent also.

Bug: none
Test: attach, run app, pull, process, enjoy the flame graph.
Change-Id: I6256a99c2651696b973c25a5955e3bb9251b86a1
2 files changed