Move site URL code from index to config

Per #564. Both are terrible places for it, but @krues8dr points out
that it’s impossible to override unless it’s defined in config.inc.php,
what with constants being actually constant—that is, they cannot be
redefined.