[vm][windows] Implement VirtualMemory::FreeSubSegment
[vm][windows] Implement VirtualMemory::FreeSubSegment

Fixes #27505

This relands fc775b3e9ba7631c01e4725ac8f7a59d22b2268f with a fix to

VirtualMemory::~VirtualMemory: on Windows the only way to release
virtual address mapping is to invoke VirtualFree(..., MEM_RELEASE) with the
original base pointer returned by VirtualAlloc - that is why we need to call
VirtualFree is size of the reservation is 0: the whole reservation might have
been decommitted by VirtualFree(MEM_DECOMMIT) but it is still present.
Change-Id: I7d1d444693c523b327d44266d5fe70f7a5d8f803
Reviewed-on: https://dart-review.googlesource.com/52642
Reviewed-by: Zach Anderson <9f8b31e960a68dade71618f1ff6da6e23a1edfc9@google.com>
Commit-Queue: Vyacheslav Egorov <72c81f38df725d8f1832acb9b5bb99563fc2f1b9@google.com>

dartino/dart-sdk,dart-lang/sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-lang/sdk,dart-lang/sdk,dart-archive/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk