To get rid of the awful (and buggy!) ALIGNPTR stuff that used to
be in coap_pdu_clear(), a new memory type COAP_PDU_BUF has been
introduced for Contiki. This allows storing the message payload
in its own memory chunk similar to the way it is stored for lwIP.
Two new functions coap_malloc_type() and coap_free_type() have been
added to centralize the typed memory allocation for Contiki and LWIP.
Currently, calls to memb_alloc(), memp_malloc() and coap_malloc() are
distributed across several modules. The idea of the new functions is
to centralize memory management in one place (mem.c). coap_malloc()
and coap_free() are still available as wrappers for the new functions.