dialog: Set the dialog context on incoming replies

Before, the dialog context would be derived from the callid and tags. This
could select the wrong dialog in case of spirals. This patch sets the correct
dialog context by storing the it in the transaction and restoring it on an
incoming response. Now the correct dialog variables are available in
onreply_route.
dialog: Set the dialog context on transaction failure

Before, the dialog context would be derived from the callid and tags. This
could select the wrong dialog in case of spirals. This patch sets the correct
dialog context by storing the it in the transaction and restoring it on a
failure. Now the correct dialog variables are available in failure_route.
dialog: Correctly restore dialog lifetime from DB

Restore the lifetime to the configured value instead of the offset from the
time the reload from the DB took place.
dialog: Send properly structured responses on RPC requests

Instead of dumping random blobs in structured protocols (json, xmlrpc),
return properly structured data.

Each dialog is a struct with named fields, a list of dialogs is an array
of structs. Variables and profiles are arrays in the dialog struct.

Dialog contexts still todo.
dialog: Allow '_' in dlg profile names
dmq: Fix indenting
dmq: Set send_socket to the correct address

Documentation says the server_address is the address used to send messages
from. Make the code actually do this.

UDP is hardcoded for now because DMQ doesn't work with other protocols (yet).
dmq: fix copy-paste error resulting in the peer's description not being copied
dmq: Various sanity checks and initializations
dmq: Set node status to value in uri

The status was forced to ACTIVE regardless of the status in the uri.
dmq: Use the received status updates from peer hosts to update in-memory status
dmq: Handle Max-Forwards correctly when maxfwd module is used.

The maxfwd module will change the current msg buffer with a decreased
Max-Forwards header. Detect this sitation via the 'parsed' field and handle
it.
dmq: Broadcast nodelists to all hosts

Update all hosts with updated state on shutdown.
dmq: More efficient peer storage

Allocate only 1 hunk of memory for the entire peer's storage needs.
dmq: Parse Content-Length header if it isn't parsed yet
jsonrpc-s: Don't make up a random reply when the reply is empty

In case the function was registered with RET_ARRAY, return an empty array,
as that is a valid response.

Else, there is no sane response, send an empty object for now. This should
maybe become an error repsonse instead.
jsonrpc-s: Link to srutils for access to srjson
dmq: Add an RPC interface to query the nodes in the cluster