Go back to malloc and free

This change was discussed as part of 0e0e050939b009d721e1c4db94b71471f8b287a2
Silence some clang warnings

See discussion of a88a01524c73d992e128ee00526c5fc572ced61e
Fix issues of 6a250cd85fb2a9a93e6c66532f73620750fa686f
Clarify remaining sign changes
Silence "variable unitialized" warnings

This changes doesn't really impact performance but enable us to be more
strict about this type of warnings and to discover bugs early.