itm: init sock_str to null value if no sock pointer is set in branch

- case of creating branches from a 3xx reply
- reported by juliabo [at] gmail
- identation made coherent with tm module style
- corresponding to master commit 254d0c43a84ec87801e58b4f990a2029c0e27c6f
modules/sca: fix hash entry deletion

sca_hash_table_slot_kv_delete_unsafe() uses internally sca_hash_entry
but incorrectly called sca_hash_table_slot_kv_find_unsafe() to
initialize the entry. That function returns the node value, not the
node itself. Use instead sca_hash_table_slot_kv_find_entry_unsafe().

Should fix the crash in FS#366.

(cherry picked from commit 56e4f4518028e73f9ebd053242a100a5c3b7eb53)
dialog: init cseq to 0 if not available yet for one side

- based on a report by Morten Isaksen

(cherry picked from commit 082a6c43938cf8e3839d46fd070e391bd522d4ed)
modules/ndb_redis: solved bug in second call to redisvCommand.

(cherry picked from commit 52a34d269931f6f3a50b3fc532405624b9e38d23)
usrloc: db_update contact by instance + reg-id
- backport from master f67171c
registrar: clean static values at pack_ci

(cherry picked from commit 66185905850cd2ac9ab933776184da0f0882e5ac)
permissions: re-init db connection for reload cmd

- some workers for specific mi/rpc commands may not have a db connection from the start

(cherry picked from commit cb23be9456c178957399ec9d8ce8a1420d50fc32)
mem: malloc(0) should return a valid pointer for free according to specs

(cherry picked from commit f61ff34aac7c7bae3a96fb698a899c8a0e692a9f)