This patch includes several changes to reduce the overall footprint
of the allocator:
- for realloc'd chunks: only keep the same chunk when lowering the size if the delta is within a page worth of bytes;
- when draining a cache: drain the beginning, not the end; we add pointers at the end, so that meant we were draining the most recently added pointers;
- change the release code to account for a "freed up" last page: when scanning the pages, we were looking for pages fully covered by blocks. In the event of the last page, if it's only partially covered, we wouldn't mark it as releasable - even if what follows the last chunk is all 0s. So now mark the rest of the page as releasable, and adapt the test;
- add a missing setReleaseToOsIntervalMs to the cache-less secondary;
- adjust the Android classes based on more captures thanks to pcc@'s tool.
Should be scudo::uptr