SPARK-1291: Link the spark UI to RM ui in yarn-client mode

Can the functions addAmIpFilter() in ApplicationMaster.scala and ExecutorLauncher.scala be combined in say a new file YarnUtil.scala?