SPARK-2168 [Spark core] Use relative URIs for the app links in the History Server.

Removing full URI leaving only relative path in link to the completed application plus unit test
Sorry about the identation I was pretty sure it's fine when I was committing this one.

About "when" and "then", it's an old habit to simulate BDD-style of testing in Junit, however in Scala it could be replaced by using Specs2 or WordSpec trait from ScalaTest.

Let me know what u would like me to change.