More changes to lwm2m_{malloc,free} in er-coap-13

Signed-off-by: David Navarro <david.navarro@intel.com>