xmpp_server_{srv, a}_lookup are much more robust and well-written

xmpp_server_a_lookup would fail if a server had SRV records for
other purposes other than pointing to the buddycloud server.
If it had an SRV record pointing to an external address (for whatever
reason) the test would attempt to locate an A record named after that
address and fail if it couldn't find such record.

Now, it only fails if, among the addresses pointed by the existing SRV
records it could find, there is no A record named after one of these
addresses (in other words, no SRV record is pointing to an A record
defined on the same DNS), or if there is a CNAME record named after one of
these addresses (some SRV is pointing to an CNAME record defined on the
same DNS).

Actually just had a though about the second fail condition (CNAME present)
and it is a bad approach: it shouldn't fail even on this case -
the existing CNAME records obviously may exist for other reasons.
But should give a severe warning though, as the SRV record
intended to show where is the buddycloud server MUST NOT point to a CNAME
record, but to an A record.

So it should fail only if there is no A record being pointed by any SRV
record.

This commit also contains some typo fixes and small refactorings on other
classes.