scheduler: Shut down the scheduler before terminating the heap

Shut down the scheduler before terminating the heap (i.e.,
PartitionAlloc). This is needed because the scheduler makes heap
allocations that need to be freed at destruction time.

BUG=391005

Review URL: https://codereview.chromium.org/475033002

git-svn-id: svn://svn.chromium.org/blink/trunk@180295 bbb929c8-8fbe-4397-9dbb-9b2b20218538