tm: safety check for user_agent_header value

- don't add the header in local generated requests if the value is empty

(cherry picked from commit cea9b91dacdb23b22fc1a7dd8454994eab9efa6e)
core: safety check for server_header lenght

- don't add the header in local generated replies if the value is empty

(cherry picked from commit 866ddc109bfd7c681e13ce529d271e8a2a33a972)
tm: handle r-uri alias parameter for local generated requests within a dialog

(cherry picked from commit 3e01905143ace159b18e11a31edf39018d754bba)
core: execute onsend_route for replies before sending out

- control execution of onsend_route block for replies via parameter
  onsend_route_reply

(cherry picked from commit 214b161e644c2d7468d9ac3ea13ad0be5196d143)
dialplan: extended debug message to be more useful

(cherry picked from commit 37c6e7ec80a16b93751d535de3b7784c1270d8b8)
kamctl: support of fnmatch operator for dialplan

- do not reload rules in memory after each change in database to allow
  batch updates. Reload command has to be done explicitely
- parameters of addrule after match expression are optional

(cherry picked from commit 860ebc3e971ed562c441054f7c09def1a505ea34)
kamctl: search for greadlink first

- bsd version of readlink is different than gnu version

(cherry picked from commit b209f27df95ffb27ea8fef00a402f2a27b8871a7)
kamdbctl: search for greadlink first

- bsd version of readlink is different than gnu version

(cherry picked from commit ba1967df93fa9bcd39070c325f72081b5adf7748)
uac: init avp_value lenght to be safe when avp is not found for restoring From/To URI

- reported by Klaus Darilion, FS#479

(cherry picked from commit a4432c327044e720d4a2ac388f7aa0692f36e873)
db_cluster: safey check to be sure the command is implemented by db connector

- reported by Miguel Reis, FS#476

(cherry picked from commit d1541b8299581cdfaf84169e307f47116def5cbf)
dispatcher: normalized section name for rpc commands in docs

- easier for indexing

(cherry picked from commit 45eae146d49a8e9bc55fe553815fa6739b8cebe6)
pua_mi: removed empty sections from docs

- updated title for mi commands sections to match indexing expected
  value (reported by Juha Heinanen)

(cherry picked from commit aaca5cc26960e52361bdfcc4e498908c39805207)
core: default tcp read buffer size set to 16kB

(cherry picked from commit eccc58969ca38b9eecd22a0d1ecccf440d9e8ec4)
core: pv print default buffer size set to 8kB

(cherry picked from commit b1a8a624146056e38c725b70273174324dd134a4)
tm: default value for failure_reply_mode set to 3

- discard previous replies if a new serial forking step is done

(cherry picked from commit 8118c85bc53494c5a1d6e0a9fd655778f8ca8b61)
core: default size for shared memory is 64MB

- decent size at least for 64b architecture where pointer overhead is
  bigger

(cherry picked from commit d3ce0717198cc0147c84c3526eb34468f847aad2)
tm: updated readme with default value for failure_reply_mode

- addapted from master commit 469c150
Makefile.defs: version set to 4.2.0-rc1