[irc] Make irc.error work without origin and trigger. Also fix obvious bugs.

It's still a mess but will have to do for now.

Obvious bugs:
-Not closing the log file on errors.
-Encoding and decoding stuff back and forth for no reason.
[bot, module, tools] Add new willie callable attribute interval.

bot.py:
-Add new thread for calling functions that have interval defined.
-Add handling for the new interval-attribute.

module.py:
-Add decorator @interval.

tools.py:
-Add PriorityQueue.
-Add released, a context manager that temporarily releases a lock
[bot] Remove debug prints that got left in.
[bot] Refine handling of exceptions in scheduler thread.
[bot] JobScheduler comments.
Merge pull request #285 from Venti9874/interval-feature

Add interval callable support