Fix warnings

 * Various parentheses were missing which made &s ambigous
 * Several system routines like write() were missing error handling
 * In S5BManager an unitialised value could occur
 * xmpp_stanza.cpp: Conversion from string literals to char* is deprecated

Fixes: #1035
Add several operators to netnames

operator== for XMPP::NameRecord
operator<<(QDebug,) for XMPP::NameRecord, XMPP::NameRecord::Type, XMPP::NameResolver::Error
Improve documentation of XMPP::NameResolver
Intial implementation of XMPP::WeightedNameRecordList

XMPP::WeightedNameRecordList shall offer a simple way to walk weighted and
 prioritised DNS records, like SRV records.
Initialised from a QList<XMPP::NameRecord> it will offer the next best
 host until there are no hosts left.
Port of BSocket to use XMPP::NameResolver

It is now a socket with automatic hostname lookups,
 using SRV, AAAA and A DNS queries.
Port XMPP::AdvancedConnector to use new BSocket features

This goes hand in hand with lots of cleanup, especially in data flow
Merge branch 'master' into HEAD

Took theirs for formatting, always.

Conflicts:
	src/irisnet/corelib/netnames.cpp
		operator<<(QDebug dbg, const XMPP::NameRecord &record):
		* Took theirs for XMPP::NameRecord::Null.
		* Merged theirs+mine for XMPP::NameRecord::Any.
	src/irisnet/corelib/netnames.h
		XMPP::NameResolver:
		* Merged theirs+mine for the documentation,
		  as I consider the warning to be still necessary.
	src/irisnet/noncore/processquit.cpp
	src/xmpp/xmpp-core/xmlprotocol.cpp
	tools/icetunnel/main.cpp
	tools/nettool/main.cpp
		dns_resultsReady(const QList<XMPP::NameRecord> &list):
		* Merged theirs+mine as their error check was wrong.
		  Added a comment explaining that their error handling is
		   not optimal.
Document BSocket::Private::protocol
Tiny cleanup in declaration of XMPP::WeightedNameRecordList
Fix BSocket::handle_dns_srv_error() to cleanup correctly on error
More list operators for XMPP::WeightedNameRecordList

Adds several variants of append() and operator<<().
Also adds clear() and a bit more documentation.
Simplify BSocket's SRV handling, move list initialisation

Move srvList and hostList initalisation from the respective *_ready() slots
 to the appropriate connect*() method.
Simplify BSocket::handle_dns_srv_ready() using
 WeightedNameRecordList::append().
Fix WeightedNameRecordList::takeNext() displaying wrong weight in debugmode
Implemented a new XMPP::ServiceResolver on top of XMPP::NameResolver.

Use this to do SRV lookups or hostname lookups and want QHostAddress back
 instead of doing all the tiny steps in between on your own.

Warning: I disabled some code in XMPP::NameManager.
NameManager and ServiceResolver seem to be interwoven to some extend,
 but I was not able to quickly identify the purpose of that.
I encountered no issues when implementing ServiceResolver on top of
 NameResolver instead of NameManager, and everything seems to work well so far.

ServiceResolver was unused before, so this commit should not change any
 behaviour.
Port BSocket to use the new XMPP::ServiceResolver

Instead of using XMPP::NameResolver directly, BSocket now leaves the odds and
 ends to ServiceResolver.

A slightly changed way of handling failsafe hosts enables BSocket to use a
 slicker API, which I immediately used in XMPP::AdvancedConnector.

Everything should behave exactly like before, just with nicer code.
More comments/documentation for XMPP::ServiceResolver
Comments/documentation for BSocket, and fix a wrong error message
More detailed documentation for XMPP::ServiceResolver and add copyright info

The logic of BSocket moved to XMPP::ServiceResolver, thus move the (internal)
 documentation, too.
XMPP:ServiceResolver: Fix a potential bug if an invalid port was specified

Previously this invalid port could have been returned via resultReady(), thus
 early santity checking seems better.
XMPP::ServiceResolver: Bring back the code to resolve dns-sd instances