core: added some safety checks for cfg framework pointers

- avoid dereferencing null in corner cases
textopsx: init local variable to avoid testing invalid value
textops: init s field of uri str structure for proper evaluation

- otherwise can get uninitialized to last if block of
  get_uri_and_skip_until_params()
uac: safe initialization of vars and debug message for uac_replace_to()
core: print rdata pointer and wrap null condition around it in dbg message
core: safety check for finding select final node
parser/contact: cleaned log messages and safety check for invalid iterator call
ctl: free allocated pointer in case of error
dialog: detect the param value type for setting by routing block
dialplan: fixed typo in define for guarding .h file

- init local variable to avoid warning
mqueue: use static var to return pointer to dynamic queue name
msilo: check to be sure len is positive before trying to copy string
pv: return error if shm is not initialized when $shv() is used
registrar: test returned value for socket when socket flag is set and xavp is used to hold it
rr: coherent check for optional user part of advertised rr
textops: use local variable to copute the offset in buffer for hdr ops helper function

- when a prefix was given (e.g., append_uri_hf()), it could have led to
  usage of invalid value
tls: test if conection is still active for peer verification
tmx: check if t is null or undefined for returning branch index
usrloc: fixed c&p error for variable name in ul_rpc_add()