Add deallocate calls to the realloc-16687.rs test.

Fix #17303.
auto merge of #17475 : pnkfelix/rust/fix-17303, r=huonw

Add deallocate calls to the realloc-16687.rs test.

Fix #17303.