Functions#getRelativeLinkTo now normalize the output url.

Added some unit tests
(cherry picked from commit f6cc50721707b03ad8f8ad0c987a5377460cd743)

Conflicts:
	core/src/main/java/hudson/Functions.java
	core/src/test/java/hudson/FunctionsTest.java