cleanup
Extract same code to method.
Refactoring converters.
Merge pull request #160 from methane/refactoring-converters

Refactoring converters.
Basic Django support.
BAD_NULL_ERROR is IntegrityError
Better exception throwing.
Remove unnecessary encode/decode before querying.
Reintroduce connection.encoders for Django compatibility.
Close socket when error occured while connectiong. (Fixes #58)
Use setuptools.find_packages() to find all packages (Fixes #154)
Allow ping on closed connection. (Fixes #147)
pymysql.Binary() uses bytes() instead of str() (Fixes #142)
Fix test failure on Python 3.
Send init_command and sql_mode when reconnect.
Small hack for performance(~5%)
Remove MysqlPacket.peek() (~10% performance gain.)
byte2int => ord (~10% performance gain)
Use io.open() for receive buffering.

~10% performance gain on Python >2.7
Use io.BufferedReader to support gevent.