serialization: deallocate memory of deserialized types correctly
serialization: deallocate memory of deserialized types correctly

Memory was not deallocated properly. This entire interface
should be changed to use unique pointers instead of manual
(de-)allocations.

Signed-off-by: Helge Bahmann <c5618920f622561f9c0ec5c42219c4c08180149f@chaoticmind.net>

phate/jive,phate/jive,phate/jive