Weather Module Fixies
weather: add error handling and format code

pywapi is nice enough to handle exceptions itself,
and putting the error in the returned dict, which
we now use.
Also marked some strings as alternatives and
did a bit of cleanup and code formatting.
Only import JSON files, newline escaping

The bot was importing every file in the alternatives directory.
Changed to import only .json files.

We were using a very esoteric function for newline escaping.
Now using str.replace and escaping tabs as well.
Temporarily don't echo back url in urlparser

As requested by the channel
Produce a log for pisg stats. Fixes #12

We changed logging so it produces a log
formatted like moobot's.
Expect errors ;)
Add URL shortener to urlparse. Fixes #14

Uses goo.gl API anonymously.
Also cleaned up the code a little.
Make shortcut for channel or user. Empty Template.

Choosing whether the intended target for messages,
either the channel or the user, for commands that do both
was common enough to incorporate into the base class.
From now on, using self.target is a sane default.

Also added an empty module template.
Always guess encoding in urlparser

There are some pesky sites that don't report the right encoding in
their headers, and instead rely on the http-equiv meta to set it.
The fact that browsers are smart enough to guess don't make you
right to ommit headers people.. sigh!

Instead of parsing the whole html, I'm using charade that comes with
requests to always guess the header. Great results so far.

Also, if the content is not marked as (x)html or xml, just
output the content type and stop there.
Broke urlparser in last commit. Fixed.

DeMorgan, I hate you :)
add event types to moobot logging

added PART and QUIT, although the parser doesn't seem to use them.
Help: Introspection functions

We are very well on the way to a help module
Add help module, list command

More introspection functions and some code beautification
in modules.__init__.py and introspection.py
Fix color escape in url for urlparse. GitHub bots.

There were times when a color coded line containing a url resulted
in a url with illegal characters. Fixed by stripping colors.

We are using GitHub bots to report pushes on the channel, so
we need to ignore their join/parts. urlparser does not ignore them
because we find its finding the url useful.
Disconnect the bot on KeyboardInterrupt

Right now, I'm using Control-C to bring down the bot, a lot.
I'm letting the bot catch it and try to disconnect.

Maybe this will come back and bite if it gets stuck but kill -9
is also an option. We'll se then.
Hide some commands from list
Don't do default behaviour for GitHub bots
urlparse: changed title parsing to beautiful soup

Repeat after me, unicode and html parsing is hard.
Now noticed that the html entities were getting
to the output. Also, charade had some trouble
with the encoding of some bullet characters.

Hope Beatiful soup 4 is up to the task.
More introspection work. No functionality changed

Build help inside an index.
Help: list, help, modules commands. Major cleanup.

Fixes #6
Brought introspection up to speed and deleted unneeded functions.
Bot now builds an index.
Changed list command and added help and modules, using the index.
No full help for now, as they seem large and slow.
moolog: Rotate logfiles at midnight