core: fix default read-only DB URL
(cherry picked from commit fdb6c8cbafec7849367f16f5dc56ffa20885bef4)
modules/presence_xml: fixed issue with parsing some pres-rules documents

- pres-rules that contain external links in a <conditions /> node don't
  have to have <identity /> nodes in the <conditions /> node.
- Kamailio returns an error when it finds a <conditions /> node with
  no <identity /> node inside it.
- Kamailio doesn't support external links, but it should skip over
  the <conditions /> nodes that contain them rather than return
  an error as later <conditions /> nodes may contain entries it can
  work with.
(cherry picked from commit ac99219b0a850e0305eaf661b028536cfc28e2cb)
auth: skip processing of PRACK in consume_credentials()

- report and patch suggestions by Jorj Bauer
(cherry picked from commit 2a77ed2bdc9341ecf7d7200e420a1f49e4e9b6ab)
xlog: link to wiki updated
(cherry picked from commit 343379957ab783a32c48822de479a9d8c2dafdf3)
pv: updated link to wiki site
(cherry picked from commit ebeb18ffed8e81ae472b4c07097b58fbea115b5b)
acc: updated link to pseudo-variables cookbook
(cherry picked from commit f0c467f64c044de0b0f37addccb97d3ccff78706)
docbook: uptdated wiki link in entities file
(cherry picked from commit 2b97e81b281802283ebc665da6f9190f0a9705ab)
usrloc: re-init sruid struct for each child

- avoid overapping values for xmlrpc handling
(cherry picked from commit 20646b530baa1a2807e52048a8d99d31d2171bb6)
sqlops: use one char buf for empty strings in db results

- safe for the parts of code that want to access it even for write
(cherry picked from commit a74980270b655124c276279e54b8f82965f3f4b8)
registrar: added debug message to print generated ruid for contact

- formatted condition to fit 80 char long line
(cherry picked from commit 735f83d6346c97d6f7b1da26a2fee1b6270872b1)
usrloc: option to do db update/delete ops using ruid

- new parameter db_obs_ruid - if set to 1, db update/delete operations
  are done using ruid value
- if paramter set to 0 (default) the old style using aor, contact and
  call-id is done
(cherry picked from commit 61e08282c905c2ee03a2be618b1e700fc0acbdeb)
usrloc: documented db_ops_ruid parameter
(cherry picked from commit e66842c2fc34d8dc8980efa821f7039685edef87)
usrloc: update call-id value in db when matching record by ruid
(cherry picked from commit 0125cdf0e75271a8478a3eadacc54ea1c1eb4da0)
modules/*: README regenerated for updates to db_url and wiki
sipcapture/siptrace: set default db_url to read-write URL
(cherry picked from commit 81f622b9ef7d32434659f1e6d9a21c8013cefec7)
pkg/deb: updated version to 4.0.1 in deb specs
pkg/rpm: updated version to 4.0.1 in rpm specs
Makefile.defs: version set to 4.0.1
ChangeLog: content updated for v4.0.1
db_mysql: add cast to remove compile warning