Generic memory allocation context.

Default is libc malloc/free.
This will be used to supply to functions where a memory is allocated
in some context (f.e. when building packet) so the API stays the same
and we could switch the allocator as we see fit.

Change-Id: Ia5956b6da38d9feb01c5bfb0a4cd4e9393db0589