Various cleanups:

- Use setuptools instead of distutils.
- Add dependency on six, and use it for string types and integer
  types.
- Flake8 cleanups.
- Add .egg-info files directory to .gitignore.