Add method to finalize the dynamic storage allocator (#418)

* [core] implement alloc::finalize for the dynamic storage allocator

* [core] adjust tests for the changes

* [core] apply rustfmt

* [core] fix clippy warning

* [core] add SAFETY comments to dynamic storage allocator for Wasm

* [core] add a Note to the docs of alloc::{initialize, finalize}
16 jobs for master in 6 minutes and 2 seconds (queued for 3 seconds)
Status Job ID Name Coverage
  Check
passed #523603
linux-docker
check-std

00:01:35

passed #523604
linux-docker
check-wasm

00:02:01

 
  Workspace
passed #523605
linux-docker
build-std

00:02:03

passed #523606
linux-docker
build-wasm

00:02:26

passed #523609
linux-docker
clippy-std

00:01:32

failed #523610
linux-docker
clippy-wasm

00:00:12

passed #523608
linux-docker
codecov

00:04:25

failed #523611
linux-docker
fmt

00:00:15

passed #523607
linux-docker
test

00:02:34

 
  Examples
failed #523614
linux-docker
examples-clippy-std

00:00:12

skipped #523615
linux-docker
examples-clippy-wasm
skipped #523616
linux-docker
examples-contract-build
skipped #523613
linux-docker
examples-fmt
failed #523617
linux-docker
examples-generate-metadata

00:00:12

passed #523612
linux-docker
examples-test

00:01:31

 
  Publish
skipped #523618
linux-docker
publish-docs
 
Name Stage Failure
failed
examples-generate-metadata Examples
_____No such targets dir, proceeding from scratch_____
$ sccache -s
error: failed to get stats from server
caused by: Failed to send data to or receive data from server
caused by: Failed to read response header
caused by: failed to fill whole buffer
Running after_script
Uploading artifacts for failed job
ERROR: Job failed: exit code 1
failed
examples-clippy-std Examples
_____No such targets dir, proceeding from scratch_____
$ sccache -s
error: failed to get stats from server
caused by: Failed to send data to or receive data from server
caused by: Failed to read response header
caused by: failed to fill whole buffer
Running after_script
Uploading artifacts for failed job
ERROR: Job failed: exit code 1
failed
fmt Workspace
_____No such targets dir, proceeding from scratch_____
$ sccache -s
error: failed to get stats from server
caused by: Failed to send data to or receive data from server
caused by: Failed to read response header
caused by: failed to fill whole buffer
Running after_script
Uploading artifacts for failed job
ERROR: Job failed: exit code 1
failed
clippy-wasm Workspace
_____No such targets dir, proceeding from scratch_____
$ sccache -s
error: failed to get stats from server
caused by: Failed to send data to or receive data from server
caused by: Failed to read response header
caused by: failed to fill whole buffer
Running after_script
Uploading artifacts for failed job
ERROR: Job failed: exit code 1