purple: fix memory leak in set buddy status

Reported in this forum thread

  https://sourceforge.net/p/sipe/discussion/688534/thread/4aca1c0a/

(cherry picked from commit 97d879c680c501717080c4507f050e065c90744e)
transport: fix potential memory leak when signing message

Another leak reported in this forum thread

  https://sourceforge.net/p/sipe/discussion/688534/thread/4aca1c0a/

NOTE: I could not reproduce it so this fix is just a guess.
(cherry picked from commit 71e1c0021b25291031a5db2fb89a656f483728fd)
Fix #262: Adium: SIPE doesn't auto- or re-connect

If server auto-discovery is in use then the plugin doesn't have a value
for KEY_CONNECT_HOST. We used to set it to the localized name returned
by NSHost. But that isn't necessarily a valid DNS hostname and therefore
Adium's reachability test fails for the SIPE account.

Now we hard-code the value to "localhost" instead. During my tests this
was the only value that always worked.

(cherry picked from commit 4f7b82fb3aaf1b608faaa86613ee330e353e29c6)
Fix #262: Adium: SIPE doesn't auto- or re-connec (II)

If server auto-discovery is in use then use the well known host
"adium.im" instead of "localhost". This prevents the SIPE account from
going online when there is no network.

NOTE: this will mean that SIPE will not auto-connect for users that are
      on an Intranet-only setup, because they will not be able to reach
      the host adium.im on the Internet.

(cherry picked from commit c8b699e4ef7dd038a332964679d28094c4868b56)
ucs: only initialize when contact list is migrated

commit a58344becf4d0bc0518262492c3b9a79020120c4 changed UCS to always
fully initialize, because we needed it for buddy photos. That reason
went away with commit ce3df80c38e07f8879fb52a15467f5268fcba040.

(cherry picked from commit 7131dc0430636d25c094e2cc30ab5466ba96eee5)
Fix #263: ADFS fails when user and login name differ

Use authuser also for web ticket ADFS requests, if it is set. This will
fix failing ADFS authentication for users where the SIP user name is
different from the authentication name.

(cherry picked from commit 32ff1c0c50a3217f8362c4b832d43a41b3fcf104)
processing the response to presence publish event(SERVICE). For some lync servers, a publish does not trigger a notify. So the only way to update the state version number is to process this response.

(cherry picked from commit b996d254b2f0b888d6551e202f220f4e3917172b)
purple: don't ignore status change when idle-away

commit 74820ce888af76c76c89e05d229aece0de33f443 added a check to ignore
state changes when the current libpurple state is idle or away. It is
not clear why this check was added. Simply remove it.

This should fix the long-standing issue that Pidgin status was not
returning to available after a meeting ended.

(cherry picked from commit c58bb402552a3fd2e7a083ecae730f600dde57a5)
Release 1.18.4 -- Bug Fixes IV
Merge tag '1.18.4' into mob

Release 1.18.4 -- Bug Fixes IV

Conflicts:
	ChangeLog
OBS: sync with latest versions
OBS: fix broken mingw builds

We need to generate libsipe.dll.dbgsym for the NSIS package.
purple: don't dereference PurpleRequestCommonParameters

Removed a forgotten purple_request_cpar_unref() call. We got rid of the
rest in eddd20e48adbf6148c980a0e10a0c087a3a7b318.
media: rename update_remote_media -> update_call_from_remote_sdp
srtp: parse encryption key from SDP
srtp: generate encryption key for each stream
srtp: offer encryption key when initiating a call
srtp: implement sipe_backend_media_set_encryption_keys()
notify: store ucPC2PCAVEncryption value form server
srtp: add sipe_backend_media_get_encryption_policy()