fix: GRAILS-10560 Unable to create absolute links when using PageRenderer to generate mail content

Fix the reported issue by using attrs.base (when provided) instead of request.baseUrl for calculating the cache key of absolute links in CachingLinkGenerator. Pull Request for 2.2.x branch, otherwise identical to pull request #408.