purple: add URI validity check to Add Buddy callback
buddy->name is provided by the user and therefore can contain characters
invalid for a sip: URI, e.g. when he mistakenly enters the new users
full name instead of the email address into the "Buddy's username"
field. An invalid URI can lead to SIP protocol errors causing the
connection to be dropped.
Added a new core function sip_uri_if_valid() that behaves like sip_uri()
if the provided string contains only valid URI characters, otherwise it
returns NULL.
In the case of an invalid buddy name we also must remove the new buddy
entry from the list to prevent it from being stored in the configuration
and thus causing protocol errors at the next startup.