Cleanup profiling code

This diff cleans up the profiling code in two ways:

(1) It turns the two part prepare-commit process into a one step
process. This is good because it could make it easier to reduce
code duplication in the future. For example, today multiple copies
of arena_malloc are inlined inside malloc(). This could make it
easier to de-duplicate these inlined versions.

In a few exceptional codepaths (eg realloc with an alignment
constraint where the allocation is resized but not moved or OOM)
we simply reset the sampling code rather than try to account for
things correctly.

(2) replaces the 2 variable accumulated / threshold accounting
with a 1 variable bytes until sample. This is the same as the
way tcmalloc does the accounting.