coding style refines.

I don't know if you guys like it, while I'm giving this pull request cause these codes show many coding style warnings in my editor.

So this pull request refines coding styles based on PEP8 and flake without any modification on function.

Misc refines:
1. remove duplicated method defines (`read_uint24`)
2. remove unnecessary imports
3. remove unused variable defines
4. add encoding for files
5. use "%s" for format string instead of using "+"

PEP8 coding style refines:
1. E111 indentation is not a multiple of four
2. E127 continuation line over-indented for visual indent
3. E222 multiple spaces after operator
4. E231 missing whitespace after ','
5. E251 unexpected spaces around keyword / parameter equals
6. E302 expected 2 blank lines, found 1
7. E303 too many blank lines
8. E501 line too long
9. W391 blank line at end of file


FYI, I'm using `flask8` to check syntax problems.