It looks like clang was generating somewhat weird assembly with the current
code. FromPrimary, even though const, was replaced every time with the code
generated for size <= SizeClassMap::kMaxSize instead of using a variable or
register, and FromPrimary didn't induce ClassId != 0 for the compiler, so a
dead branch was generated for getActuallyAllocatedSize(Ptr, ClassId) since
it's never called for ClassId = 0 (Secondary backed allocations) [this one
was more wishful thinking on my side than anything else].
I rearranged the code bit so that the generated assembly is less clunky.
Also changed 2 whitespace inconsistencies that were bothering me.