Make Python 3.3 compatible

This changes the syntax and semantics a bit so that the resulting code
is compatible with Python 2.6, 2.7 and 3.3.

These three versions are closer than any other 2/3 combination. 2.6 and
2.7 got a lot of syntax from 3 backported and 3.3 added the u'string'
syntax to make porting easier.

It mostly follows Armin Ronacher's suggestions:
http://lucumr.pocoo.org/2013/5/21/porting-to-python-3-redux/

The tests are not ported yet, just the library and the examples.

Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
Fix the event registry for Python3

inspect.ismethod behaves differently for Python 2 and 3 (and it seems that the
Py2 behaviour we're relying on here is actually a bug):

http://bugs.python.org/issue16851

I don't think we *need* to verify that the event is a method. As long as it has
the `_event_name` attribute (which we only set in the decorator), things should
just work.

Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
Merge remote-tracking branch 'tomassedovic/python3'

Merging in @tomassedovic's python3 compatibility patch. This comes from
an open pull request on @mrjoes:
https://github.com/mrjoes/tornadio2/pull/72.