Refactor: Python3 compatibility

- Refactor imports into relative imports
- Import StringIO from io module
- Refactor iterator .next() as function next()
- Replace file() with open()
- Replace xrange() with range() - there is a performance impact for
  this (for Python2) in Python3 range() is already xrange()
- Define basestring=str for Python3
- Use floored division - In Python2 the / operator returns an integer,
  but in Python3 it returns a float, e.g. 81/2 == 40(Python2),
  40.5(Python3). The // operator always provides a *floored* integer
discover_api() is now private

- discover_api() is now a private method called from the Client
  constructor. There no point in exposing the method since it
  can only be called once anyway.
Automatic binary string decoding

- A new parameter **decode_str** for RPCStream, connect() and spawn()
  enables automatic decoding of binary strings into Unicode objects
- Strings are decode using the &encoding option
- The default behaviour is decode_str=False, i.e. binary strings are
  returned as type bytes (str for Python2)
- Python3: unit tests default to decoding to Unicode, allowing
  the unit tests code to remain unchanged
- Python3: &encoding contents are treated as ascii, since it needs
  to be converted to unicode before it can be used
Override *decode_str* for each function call

- decode_str can now be used a keyword argument for all
  function in the API
Python3: Decode API info strings as utf8

- Regardless of decode_str, the API info object uses binary
  strings (since &encoding was not retrieved yet) for Python3
  convert the object strings to utf8 before using them
- Moved decode_obj() to util
Run Travis tests against Python 3.4
Python 2.6 compatibility fix

- Python 2.6 does not use a named tuple for sys.version_info
Python3 compatibility: __self__ instead of im_self
Python3: Decode method names for plugin requests

- In Python3 attributes are indexed by a Unicode string, using
  bytestring will cause a KeyError
- It is not clear to me what the encoding of function names should
  be they come from the Neovim source code, I assumed they use utf8
  strings rather than &encoding
Use binary strings for paths

- Python path function are consistent with the input type they are given
  i.e. if you pass in a 'bytes' parameter that will be the return type
  you will get. Since we also use byte strings for
  discover_runtime_directories() we need to be consistent when calling
  path functions.
Refactor: execfile does not exist in Python3
pydo: decode python code when running in Python3

- Attempting to generate a new function from the user input actually
  generates while mixing the Unicode function definition and a byte
  array from user input uses a literal bytes.__repr__ instead of the
  intended user code
Merge pull request #32 from equalsraf/tb-python3

Python3 support