make first BT entry more consistent

By forcing the log_backtrace, std_backtrace, and unwind_backtrace functions
to never be inlined, we can make the first entry in every backtrace
consistent across all levels of compiler optimization.

Signed-off-by: Jeremy C. Andrus <jeremya@cs.columbia.edu>
optimize: print BT logs to a string before flush

Before writing to disk, print all backtrace logs to a per-thread string
(currently allocated 64k), and flush the string to disk once at the end
of the backtrace process.

Using a ramdisk, this backtracing is qualitatively "usable" although the
traces grow fast!

Signed-off-by: Jeremy C. Andrus <jeremya@cs.columbia.edu>
tweaks to cache and buffer sizes

I also tweaked the bt symbol hash function. Meaured hit ratios after
initial cold-fill are at 99%

The total cache size was reduced in order to save memory - Android has a
_ton_ of threads! This commit also makes it easy to tweak the cache size
by simply adjusting the number of bits (BT_CACHE_BITS).

Signed-off-by: Jeremy C. Andrus <jeremya@cs.columbia.edu>
better pthread exit/start handling

Signed-off-by: Jeremy C. Andrus <jeremya@cs.columbia.edu>
more complete Dalvik backtraces

I was missing a dvmCallMethod variant when searching for Java/Dalvik
stack frames.

Signed-off-by: Jeremy C. Andrus <jeremya@cs.columbia.edu>