modules/tm: Initial revision of branch_failure_route

- New branch_failure_route defined
- cfg route is called but xlog() causes segfault
core: Initial revision of branch_failure_route

- New branch_failure_route defined
- cfg route is called but xlog() causes segfault
Revert "core: Initial revision of branch_failure_route"

Remove new branch_failure_route in favour of an event_route

This reverts commit a5946574cb9917f0a9a90ea547c9357f3f6477bd.
modules/tm: Create branch-failure event route
core: Add defines required for a new branch_failure_route type
modules/tm: Update t_next_contact_flows for use in branch_failure event_route

- Rename to t_next_contact_flow as only one flow will be used
- Selects and uses the next flow with the same instance_id as the failed branch
core: Update get_branch() to return instance from appended branches

- get_branch() and next_branch() updated
- modified select_core.c to use new function definition
modules/domain: Updated to use the new get_branch()/next_branch() functions
modules/permissions: Updated to use the new get_branch()/next_branch() functions
modules/pv: Updated to use the new get_branch()/next_branch() functions

- New instance parameter is currently not used
modules/xprint: Updated to use the new get_branch()/next_branch() functions
modules/tm: Enable retrieving of branch instance id from uac structure

- Add instance to uac structure and populate when uac created
- Add get_this_branch_instance function to retrieve instance in a branch failure route
modules/tm: Fix setting instance in uac branches
Merge branch 'master' into hpw/branch_failure_route

* master: (33 commits)
  core: set TOS for IPv6 UDP sockets
  rtpproxy: add missing wrapper function for unforce_rtp_proxy
  modules/outbound: further improvement to the use_outbound() check
  rtpproxy: support pvars in function parameters
  modules/rr: copy the flow-token for "incoming" messages when using outbound
  modules/outbound: improved check for outbound
  modules/rr: only use flow-token for routing if it doesn't point to the source of the request
  pkg/kamailio/(centos|fedora): Updated .spec after addition of cnxcc module
  Makefile.groups: cnxcc module added to extra list
  core: auto-define cfg directive MOD_modname for each loaded module
  snmpstats Add tcpasync and tcpmaxconns
  snmpstats Add IDs to sections in documentation
  cnxcc: added new module for credit control
  snmpstats activate new parts of the KAMAILIO-MIB
  snmpstats Add information about version and tcp connections
  usrloc: new option for db_mode - DB_READONLY (4)
  enum: define the max size for numbers
  db_mysql: new module parameter - insert_delayed
  Makefile: exclude debian sym link when generating tarball
  msrp: fix compile warning of argument type in dbg message
  ...
modules/usrloc: Fix get_urecord_by_ruid to return static aor

- Fixed a bug which returned a pointer to a stack variable
- Fixed some potential (?) infinite loops
modules/registrar: Allow unregister for ruids in branch_failure_route

- unregister(domain, uri, ruid) is accepted in branch_failure_route
- unregister(domain) is not.
modules/tm: Make ruid available in uac structure

- ruid is stored per uac
- ruid can be retrieved when a response to the branch is received
modules/tmx: Add $T_reply_ruid pv to return ruid for a branch reply

- Can be run from a failure_route or branch_failure_route
modules/tm: Fix t_next_contact_flow return value

- Return 1 if a new flow was found
- Return -1 if not found
modules/sipt: initial import of module