mem: DBG_SYS_MALLOC can be set to get verbose mem ops with system allocator

- PKG_MEMORY has to be undefined in Makefile.defs
tm: fixed typo in previous commit related to name of struct contact variable
tm: release re for t_check_status(pv)

- the canse when parameter is a variable and it contains a bad regex
rtpengine: chef for SHM_MEM define for kamailio embedded mode

- allow compilation with system malloc for private memory
debugger: check for define of PKG_MEMORY to execute pkg checks

- allow compilation with system malloc for private memory
db_mysql: remove line accessing freed result
db_mysql: reset prev_token to avoid double free in case of url parse error

- when db api v2 is used (ser modules)
auth_diameter: avoid double free in case of error and don't access freed pointer
benchmark: avoid memory leaks when dealing with invalid mi commands
mem: remove trailing ; to allow using as single instruction in conditinal blocks

- this is for system malloc with extra debug for private memory
tls: avoid leaking duplicated file name on re-iteration

- reset file name pointer to avoid double free in case of error handling
acc: avoid memleak at startup when failing to initialize a custome accounting  engine
avpops: initialize local variable to avoid warning on db ops function
call_control: replaced dynamic str* a local variable

- it was freed afterwards and could leak in case of error hanling
db_text: fixed access after free and proper size for allocated memory
srutils/tmrec: reset pointer after free to avoid double deallocation
core: free line_buf in case of error building via

- free buf in a very unlikely error converting src_ip to str in static
  buffer
- coherent checking of msg pointer in the function
core: safety check when declaring a cfg structure with empty content
core: free allocated memory in case of failing to get more for modparams

- keep shutdown at startup error clean
core: safety checks for pointer in dbg message printed inside dns cache