Fix bytes_freed_before issues

Recently introduced by aosp/2649222. Could cause DCHECK failures
and too many GCs before throwing OOME.

Fix a use-before-init problem.

ObjectBytePair already documented that freed byte counts could be
negative. But GetBytesFreedEver was declared as returning uint64_t.
Fixed that, which resulted in some other types changing to int64_t.
Also document that GetBytesFreedEver() is not monotonic and adjust
the aosp/2649222 code to reflect that.

Based on the stack trace, the observed failure was actually caused by
the second problem, though the first seems more egregious.

Test: Treehugger
Bug: 288446884
Change-Id: Iaa56c8e16e59ce52571e5496b5275c96304425f0
2 files changed