Move some Unsafe.* methods to core platform API

These are used by the framework's protobuf implementation.

Bug: 129062985
Bug: 130281183
Test: compiles
Merged-In: I8a8aebbdd94c0012768b7a16732e708ee35714e6
Change-Id: I8a8aebbdd94c0012768b7a16732e708ee35714e6
(cherry picked from commit 952fec49372cdf4ad28c63cca565f3ff5512852c)
3 files changed