consistency: use lwm2m_{malloc,free} in CoAP as well

If we offer customizable memory allocators, we probably want an allocator change to also affect the CoAP layer.