2.3.x functional base url

fixes http://jira.grails.org/browse/GRAILS-10661

previous attempts..
https://github.com/grails/grails-core/pull/444 wrong branch
https://github.com/grails/grails-core/pull/449 broken pull request

@graeme hope it is correct now..