Add tests for OffsiteMiddleware() + use re.escape() in domains regexp

This was triggered by this issue https://github.com/scrapy/scrapy/issues/477