[SPARK-2750] support https in spark web ui

https://issues.apache.org/jira/browse/SPARK-2750

enable spark web ui to support https, also compatible with old web ui(http).

user can switch between https and http by configure "spark.http.policy".
This is a confusing name, since this function returns a boolean but sounds like it will return a "http policy".  `isHttpsEnabled` would be a better name, although I'm not sure that we need this:

We should just be able to do

```
val https = conf.get("spark.http.policy", "") == "https"
```

instead.