core: fix condition on script callback number done inside EXTRA_DEBUG

- reported by Seudin Kasumovic, FS#388

(cherry picked from commit 740d407be4e35ee945658365ae38a1bba30fafc7)
pkg/kamailio/deb/debian: no websocket nor outbound on lenny.

Remove kamailio-mono-modules from Suggests
htable: fix crash if key_value is not string
(cherry picked from commit 065439c0fbabe2806fcd615cec5e2445db59beec)
modules/utils: http_query fixes

- Credits to Guillaume Bour.
pkg/kamailio/deb: fix lintian overrides
pkg/kamailio/deb: fix init script

(cherry picked from commit 424ab9dd4abd9b11b7cf4642335652145128fa7c)
async: free the async item after resuming the execution

- reported by Surendra Pullaiah

(cherry picked from commit c33583e6456d3500f8a9c870eb01a01d1a1fe8f4)
(cherry picked from commit 36c42be1a02fcb47d4b288136df81f424b690351)
tm: safety check for uas callid value when callid_matching is 1

- according to the documentation is for UA that cannot match the
  responses when call-id is changed, but is not the case of self
  generated requests
- closes FS#390

(cherry picked from commit 1787b4239f3494fe7a88b0868a807e86a3b92639)
(cherry picked from commit ef478ac0709a9bef99df0818f68b597f39ba7c3b)
pkg/kamailio/deb: init script. Get back SHM_MEMORY PKG_MEMORY and CFGFILE

(cherry picked from commit f46beec41b3b5caa3977ddd452b3671bebf69069)
lib/kcore: fix loop on broken values matching the prefix of a good value in parse_supported()

- reported by Savolainen Dmitri, FS#396
nat_traversal: proper size for realloc

- reported by Venky

(cherry picked from commit d9c34bec5ea0570f66df23e7e7d6f79f4721f04e)
(cherry picked from commit 26fd1d2fd24a1f4ee160ba24e2670b8e7a4e8176)
sl: fixed use of forward_reply_nocb() in sl_forward_reply()

- previous related commit was not doing it

(cherry picked from commit 4133a44cc9b1702b3a36b9386464983d2fe9aedc)
(cherry picked from commit 91241caa2c2bc51b421d024c790493fdaf24c8ee)
registar: proper unlinking deleted contact to avoid invalid memory access

- based on a report and patch by Dragos Oancea
app_perl: update constants for debug levels
(cherry picked from commit 6513ee05dd20253c0f555b18081f0eceb4baf7aa)
sqlops: safety check for result row field

- it might not be set in case of a failure in the middle of result
  conversion from db to internal memory
- freeing the partial result could result in a crash
- reported by Juha Heinanen

(cherry picked from commit f27df26ca01394250cbe12c5ccf694c6afd3707f)
(cherry picked from commit 20276e667631ec281851c2ef58d71863ae2318c4)
sqlops: reset the result container before new query is executed

- it was lost in commit 9b62514b4a90e169c9126b7bda6d87cc4c213ad2
- reported by Jonas Böttner

(cherry picked from commit 864127e6e02144c40c138d6921862b1512d01c66)
(cherry picked from commit 954fe136964296836113f5187f9cde91b197a567)
tmx: backup and restore existing T and branch pointers for t_cancel_callid()

- reported and initial patch by Guillaume Bour

(cherry picked from commit 60372d613544af1f8f06122eb77fa2a9636a6c3a)
(cherry picked from commit f7ed69d75746dc55e5a48a7a18602124e73cd3cd)
tm: exported set_t() and get_t_branch() viam tm api

- allows to backup and restore pointers to T and branch

(cherry picked from commit 777dd5e28ff6b4fcc3b1c44e841eb415c974075f)
(cherry picked from commit 09fb0aae62761ce4f251ab22c6ab9cde55e2c663)
core: added function to check if counters have been initialized

(cherry picked from commit 8161152b320f3b430523ea08e86a56f79405c2f4)
(cherry picked from commit a165fa668378da5c312a0c268aaf158ff583127f)
core: don't increment failed dns query counter for reverse dns lookup at startup

- it can happen before counters are intialized, thus check that before
- reported by Hugh Waite, FS#375

(cherry picked from commit 89c6d73dd51eb9b96f50d3f04219612fa7725224)
(cherry picked from commit a3169d02d7527110941fab8de25ba75aae759ce1)