Configurable get_domain added.

This changes allow project's users to define their own way to get_domain,
freeing them to use Django sites framework.