Cleanup environment settings in wp-config

- Add optional path to WP_SITEURL and WP_HOME
- Move database host constant to environment switch, so it can be set
per domain
- Improved checking on domains