1.2.x css relative links optimization

This fixes https://dev.plone.org/ticket/12128 for 1.2.x branch and implements a selenium test to prove it.