[SPARK-2552][MLLIB] stabilize logistic function in pyspark

to avoid overflow in `exp(x)` if `x` is large.
Better would be
```python
prob = exp(margin)/(1 + exp(margin))
```
because for very small probabilities this computation is essentially doing 1 - 1.  For example:

```python
>>> from math import exp
>>> margin = -40
>>> 1 - 1 / (1 + exp(margin))
0.0
>>> exp(margin)/(1 + exp(margin))
4.248354255291589e-18
>>>
```