Serializer: fix allocator / deallocator mismatch

Use of unique_ptr<char[]> for pointers to C strings is invalid
as it calls 'delete[]' on a heap block allocated via 'malloc'.
Use a specialization of unique_ptr which calls 'free' instead.

Bug: 184845897
Test: see PoC in the bug
Change-Id: Ib9264bebb9753d19965095ccd904aeaf54d84636
1 file changed