psycopg2_pool.py: fix pyflakes on PY3
fix pyflakes warnings on PY3
test__issue6.py: fix on PY3
fix pyflakes warning in test__select.py on PY3

Thanks to @fantix for original patch.
test__os.py: buffer/memoryview fix on PY3

thanks to @fantix for original patch.
Merge pull request #397 from surfly/pr365

py3-related fixes