[SPARK-3606] [yarn] Correctly configure AmIpFilter for Yarn HA (1.1 vers...

...ion).

This is a backport of SPARK-3606 to branch-1.1. Some of the code had to be
duplicated since branch-1.1 doesn't have the cleanup work that was done to
the Yarn codebase.

I don't know whether the version issue in yarn/alpha/pom.xml was intentional,
but I couldn't compile the code without fixing it.
I tried that before, but scalac throws a fit:

    [error] /work/apache/spark/core/src/main/scala/org/apache/spark/ui/JettyUtils.scala:149: missing parameter type for expanded function
    [error] The argument types of an anonymous function must be fully known. (SLS 8.5)
    [error] Expected type was: ? => ?
    [error]           val params = conf.get(paramName, "").split(',').map(_.trim()).toSet.foreach {