Migrate to flake8

Working on Turpial/libturpial#33 issue. Until now we covered
the following tasks:

- [x]      E501 line too long
- [x]      E302 expected 2 blank lines, found 1
- [x]      W291 trailing whitespace
- [x]      W391 blank line at end of file
- [x]      E128 continuation line under-indented for visual indent
- [x]      F401 imported but unused
- [x]      F403 unable to detect undefined names
- [x]      E127 continuation line over-indented for visual indent
- [x]      E231 missing whitespace after ':'
- [x]      W601 .has_key() is deprecated, use 'in'
- [x]      E251 unexpected spaces around keyword / parameter equals
- [x]      E303 too many blank lines (2)
- [x]      E126 continuation line over-indented for hanging indent
- [x]      W293 blank line contains whitespace
- [x]      E301 expected 1 blank line, found 0
- [x]      E261 at least two spaces before inline comment
- [x]      E711 comparison to None should be 'if cond is not None:'
- [x]      E203 whitespace before ':'
- [x]      E701 multiple statements on one line (colon)
- [x]      E225 missing whitespace around operator
- []       F841 local variable is assigned to but never used
- []       F821 undefined name
- []       F999 syntax error in doctest
Migrate to flake8
Recovered PR from @milmazz from 8 months ago
Recovered PR from @milmazz from 8 months ago (part 2)
Fixed issues when merging @milmazz changes
Fixed issue when registering new config options