mem/f_malloc: check returned pointer for bitmask index

- if null, reset slot and search on bigger chunks slots
mem/f_malloc: link previous free fragment to speed up join
Makefile.defs: compile with debugging symbols when using clang

- added -g parameter to be on pair with gcc
core/mem: define internal types for pkg and shm pools

- to allow easier identification when doing operations over mem block
pkg/mem: set pkg type when intializing memory pool
core/mem: set shm type when initializing shared memory pool
core: repaced the two pkg update event callbacks with one

- simplified usage as can be executed at the end of memory operations
  (malloc, free, realloc)
core/mem: sf_malloc initialization updated to be able to set pool type
core/mem: ll_malloc initialization updated to be able to set pool type
kex: use the new pkg update stats event callback

- print total size and total free fragments for each process
- should solve the issue when values of pkg stats were innacurate
core/mem: q_malloc updates to set pool type and pkg stats refactoring

- total free fragments are kept in memory root block to avoid computing
  them by walking the hash table
- use single event callback to update per process pkg stats, executed at
  the end of malloc, free or realloc opperations
core/mem: f_malloc updates for pool type and refactoring of parts

- removed define on statistics, it was always on for the past several
  years - the code is cleaner
- total free fragements is kept in root memory block to avoid computing
  it at runtime by walking hash slots
- attempt to join fragments when a malloc fails to reuse existing
  fragments - should help when mem_join is 0, being very fast up to the
  moment of an out of memory, when does the attempt of joining
- pkg stats updated to use the single event callback at the end of
  malloc, free or realloc operations
xmlrpc: removed unused variable in rpc_array_add

- reported by Juha Heinanen
Makefile.defs: memory manager set to f_malloc
Makefile.defs: version set to 4.2.0-dev6
mem/f_malloc: free old pointer if allocation in realloc fails
mem/q_malloc: free old pointer if allocation in realloc fails