add select to API doc

and cleanup some rst formatting
add `__dir__` to context and socket

allows completion on sockopts in places like IPython.
Currently only completes uppercase sock opts,
even though lowercase sock opts work.
fix version check in test_dir
Merge pull request #328 from minrk/cleanup

allow completion on sockopt names