Allow WritableSharedMemoryRegion to Unsafe conversion

This CL adds a new ConvertToUnsafe() method to the WritableSharedMemoryRegion
class. This new method is similar to ConvertToReadOnly() in structure. The
conversion does not modify an underlying platform handle (except it closes a
read-only handle on POSIX) but changes region's type.

Bug: 795291
Change-Id: Ie0a6b4c9850c0e223ee9299655f9bfd6c79c383b
Reviewed-on: https://chromium-review.googlesource.com/985981
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Alexandr Ilin <alexilin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574610}
9 files changed