Added _to_unicode -function to botcore. 

Pass messages to handlers through this. Also some minor pep8-fixes.