rework ratelimit distributed queries

instead of adding -1 to the counter, use the cachedb_sub function exported by
the cachedb module. This prevents ratelimit counters from adding extremely
large values for some backends (ex: memcached).
Thanks go to Brett Nemeroff for reporting and testing.
memory statistics can be used only if stats are on
when joining two frags, only the used memory changes
Add `callid` field to information returned by the `ul` module's MI.

This allows e.g. to retrieve the information even when using a memory-only store.
Mask compile-time shift/reduce conflict due to if statement ambiguity
Renamed parameter 'from_col' to 'pattern_col'
httpd: remove bogus error log
Step 1 in enhancing drouting:
- GW - load state and outbound sokcet from database
- carriers - load state (as separate field) from database
- cleanup - remove the avp "type" as no longer used
(work in progress)
Fixed restoring SOCKET info from AVP during failover
Added exec_threshold parameter to cachedb_* modules in order to be able to track slow queries
Reset the lump cond flags when the condition evaluates to false.

In case there are multiple branches, the conditions can evaluate
differently on each branch - which might lead to bad counting of the
added lumps ( used by the dialog module for dlg validation )
Step 2: use the socket info during routing to GW
Fixed keeping turns on handling PUBLISHes for the same presentity - when presentity is deleted (due a unPUBLISH) do not do any turn related ops anymore
Reported by Damien Sanders
Do not free the header string as it is part of the lumps (and freed together with the lumps).
Reported by Jeff Pyle.
Fixing bug #126
revert commit ec0d05a

dialog variables might be binary, therefore strlen should not be used
Add the SIP-wise determined "next_hop" field to ucontact_t

* based on Path -> Received -> Contact (decreasing priorities)
* URIs are parsed only at contact creation
* useful for the nathelper SIP pinging routine and domain-based lookups
* compatible with all DB modes, no extra DB columns required
Add the "remove" script function to the registrar module

* remove(domain, AOR[, target]])
* explicitly remove	contacts behind specific addresses-of-record
* may delete contacts by Contact URI or by domain
* domains are resolved before they are matched
Fix the DB representation of message flags in the acc module

* storing flags as strings rather than bitmasks prevents flag conflicts
  when doing flag modifications in the script, then restarting the proxy
* similar usrloc issue was fixed in commit 98b6b0437
uac_registrant: re-register with expires value imposed by the registrar
Ignore all cscope database files