[Mono] [GC] Fix TotalBytesAllocated and reenable test (#20427)
TotalBytesAllocated was sometimes not monotonically increasing on Mono. The reason was that when a thread was detached, we were not counting bytes allocated in its thread local allocation buffer. So, under the right circumstances the bytes would be counted while the thread is attached, but then get lost when the thread detached.
Fixes: https://github.com/dotnet/runtime/issues/2280
Co-authored-by: naricc <naricc@users.noreply.github.com>