Add Python 2.7 typing.AnyStr

Closes #350.

Also support typevar values in Python 2 mode (closes #357).
Add AnyStr to typing.__all__

Fixes #361.
Fix IO types in Python 2.7 typing

Also update builtin stubs to use more proper IO types.

Fixes #348. Fixes #351.
Add partial Python 2.7 io stubs

Closes #352.
Remove getvalue() from io.TextIOWrapper stubs

Fixes #354.
Add IO to py2 typing.__all__
Make py2 re Pattern and Match types compatible with Python 3

The types might still be too restrictive (wrt mixing str/unicode), but
at least they are consistent with Python 3.

Closes #349.
Add Union to Python 2 typing module

Fixes #312.
Add Python 2 io.open stub

Fixes #353.