core: safety check for append_branch() when called with no uri and no msg
- uri or msg parameter must be given, otherwise the new address cannot
be set
- get_redirects() from uac_redirect can execute this function with both
parameters invalid in case of invalid contact, reported by Javi
Gallart
(cherry picked from commit 2c4ed5922a2322f3b5059f6264884acfb5dec97f)