Implemented `__dir__` method for autocomplete in python shells

Ipython, bpython and other interactive shells call dir()
function on object for autocompletion function.
Fix Proxy.__dir__ method tests for python >= 3.0
Proxy.__dir__ method tests for PyPy
implemented dir()