blink/bindings: Use PartitionAlloc for compressing strings.

ParkableString compression allocates a temporary buffer inside GzipCompress
using UncheckedMalloc(). From a finch experiment (see bug), there is a
statistically significant increase in malloc() footprint on Android, even though
the only allocations are temporary.
To mitigate the regression, use PartitionAlloc to allocate the temporary data.

This changes:
- compression_utils.cc: take an external output buffer for compression.
- parkable_string.cc: Allocate the temporary buffer with PartitionAlloc, on the
  buffer partition.

Bug: 920194
Change-Id: I57c42f67ea0b09e1ae9137beade4dd0d3c6ef258
Reviewed-on: https://chromium-review.googlesource.com/c/1404083
Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
Reviewed-by: Benoit L <lizeb@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Benoit L <lizeb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#621954}
4 files changed