Fixes#1850.
The fix was already applied to Python 2, but the typevar-based solution there
leads to "cannot infer value of type variable" in mypy. I used the following
script to check:
```python
from itertools import product
reveal_type(product([1]))
reveal_type(product([1], ['x'], [False], [3.0], [(1,)], [('x',)], [{1}], [{1: 2}], repeat=5))
```
From Samuel Freilich:
In Python 2, the predicate parameter in itertools.ifilter and
itertools.ifilterfalse can be None, indicating that true or false values
should be retained (functionally equivalent to passing "bool" as the
predicate). In Python 3, filter and itertools.filterfalse have
the same behavior.
* Updated the typehints for itertools.
* Removed the overload because it caused problems and cleaned up the imports.
* Update itertools.pyi
Added back optionality of second argument for itertools.permutations.
* Update itertools.pyi
Moved the Optional which I accidentially put on the wrong function -.-