Handling undefined behavior in inffast_chunk

It was revealed by a new clang flag (i.e. basic-aa-recphi) that chunkcopy_safe
could hit a scenario of undefined behavior with the use of 'restrict' modifier when
the 'from' and 'out' pointers overlapped during decompression.

This patch targets to address this issue and unblock the enablement of the
aforementioned compiler flag.

Credit for the original investigation and the new unit test stressing the
failure scenario goes to Hans Wennborg.

Performance implications: initial numbers point to
a slight improvement for ARM big cores@64bit (i.e. 2% to 3.6%) and x86-64
(i.e. up to 7.5% for Intel i7) but a regression otherwise for 32bit
(i.e. between 2.3% to 3% big.LITTLE respectively).

Bug: 1103818
Change-Id: I9b7d2c1e47caaf498cd539fd6b77c4b949cb0dac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2309041
Reviewed-by: Hans Wennborg <hans@chromium.org>
Reviewed-by: Adenilson Cavalcanti <cavalcantii@chromium.org>
Commit-Queue: Adenilson Cavalcanti <cavalcantii@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#793239}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e0f88a903fdcb6c772de1929834a73d1662d509a
3 files changed