Add cookie domain as module option

Currently it is impossible to set the cookie domain. This pull requests introduces this feature as a module configuration item.