Only configure XMPP MUC when having owner affiliation

When joining an XMPP MUC, we should only attempt to configure it when
having the 'owner' affiliation, as only owners may configure a room.

Room configuration should happen mainly when the bot is creating a new
room (by joining a room that did not exist yet), otherwise other
people may not join the room yet. (See section 10.1 of XEP-0045).

With this change, room configuration is still attempted at all times,
but only when our affiliation is actually of type owner.

Thanks to @apophys for doing the groundwork on this.

Closes #237: RFE: Configure room only when necessary
Better message recipient setting in XMPP MUC responses

There are currently two issues when responding to messages in group
chats which are fixed by this commit.

1) Responding to commands fails when somebody has a MUC nickname
of the form something@somewhere.tld, as described in #241. The fix
is to strip the resource part in the case of MUC responses, so they
properly go to the room itself.

2) Responding to commands fails when somebody private-messages the
bot from within a MUC, which causes messages to be sent to the
so-called "occupant JID" (see XEP-0045). In this case, the sender
JID was being incorrectly detected because getStripped() was being
used.

This is fine for regular private messages, where getStripped()
would return the JID with the resource part removed. In the case of
private messages from these MUC chats however, the resource part actually
describes which user the response has to go to so stripping it off
causes messages to become unroutable. The fix here is to stop using
getStripped() in this case so that the resource is retained.

Additionally, get_jid_from_message() was setting resource as returned
by mess.getMuckNick(), rather than mess.getMuckNick().resource so the
actual resource was getting lost.

Fixes #241.
Import irc.connection within the try

There is a try/except block to protect against not having irc
installed - but there is an import that happens before that.
Move the import.
Merge pull request #245 from emonty/master

Import irc.connection within the try
Pretty-print output of the !config command
Merge pull request #246 from zoni/prettyprint-config

Pretty-print output of the !config command
Merge pull request #243 from zoni/241

Better message recipient setting in XMPP MUC responses
Merge pull request #242 from zoni/237

Only configure XMPP MUC when having owner affiliation
Ignore messages from self

This ensures messages from ourselves don't end up trickling back into
callback_message, triggering a potential loop. This code was already
introduced previously in 4053eb6c242ef1c99e10257e099351e633202da7, but
was lost when the xmpp back-end was refactored extensively during the
move from xmmppy to sleekxmpp (the commit which actually removed it was
9a05e7f6609c749dfbeeae89df68d15bf2e4532b).

Fixes #247