When updating the database records, first perform all update and inserts and then check the timeout for expired records -> records to be deleted.
Doing first the delete may hide records "expired but to be updated".
Credits go to Nick Altmann
Closes bug #112.

(cherry picked from commit 3c1164a012204e92150c5df5101aba709e4cb123)
Merge pull request #174 from wdoekes/wjd-fix_dialogaggr_memleak

presence_dialoginfo: Fix memory leak in dlginfo_agg_nbody.
(cherry picked from commit 1e02b323fa38e81949a3e8e9b3cf4e37dd9fa6e5)
db_http: add value_delimiter parameter

Add a new parameter used to specify the fields delimiters for queries
variables

(cherry picked from commit ab80adec1665b6416d92637d10677a696550c1db)
residential config: Also define the "xcap" db_url
(cherry picked from commit 4b4ac96e13dc4686172eb4eecb9dee68be2e6f2b)
For topo hiding and fix_route_dialog() usage, do not try do add del lumps for already deleted route headers
Added support for embedded arrays within MongoDB documents
(cherry picked from commit 61e21a0a2d9d79b91e5e8692a7c1f3e7cc77cf83)
update ChangeLog file for 1.10.1
update Makefile for 1.10.1
update specs for 1.10.1
Merge pull request #74 from wdoekes/wjd-timeout_avp_and_publish

Set the dialog lifetime before running the callbacks.
(cherry picked from commit 4df8a64db2d4d017a73c6f131b0925a0a82c488c)
sipmsgops: Fix trailing whitespaces when doing "codec_delete_re"

	* deleting the last payload attribute led to trailing whitespaces
	* some UAs would return "488 Not Acceptable Here" in this case
(cherry picked from commit c9657d4154ebc3ee271e981db036a10d9b9a7922)
pi_http: fix copy/paste error that can lead to a crash when 'order_by_cols' is used
pi_http: fix HTTP escaping
(cherry picked from commit 980dfc853c411730e07db74242188bc6190aafdf)
Fixed detection of the module functions used in script - we need to look also into the logical expressions (like IF and WHILE conditions)
Credits for reportind and helping with the troubleshooting go to Justin Zondagh

(cherry picked from commit ab22467a2ed8af97ba89ce53144d4414dbcd5a52)
presence_dialoginfo: Fix bounds checking by using a helper function.

Reported by: dsandras
> About the bound checking error, the code was cut&pasted from another
> place in the same file where the same error is still present:
> ...

Also I replaced a heap str with a stack one in build_dialoginfo. This
one wasn't freed either unless an error condition was hit.

(cherry picked from commit 6d058ec495c2faa015b24f412e2fe1b55526657e)
Fix two mem corruptions.

Closes github issue #176