Call memory allocation functions in matched pairs
The CLib now allocates extra to record private information behind the
allocation so mem
must either call calloc/free/realloc or OS_Module 6/7/13,
not a mixture of the two.
This fixes a problem on RISC OS 3.10 where various allocations failed/memory leaked when used in conjunction with a recent C library. See https://www.riscosopen.org/forum/forums/4/topics/17355#posts-133718 for an example manifestation.
(Part 1 of 2)