Allow most values of $civicrm_paths['XXX']['url'] to be relative
Overview
--------
The `$civicrm_paths` variable allows a sysadmin to override various path and
URL computations.
```php
$civicrm_paths['civicrm.packages']['url'] = 'https://example.com/libraries/civicrm/packages';
```
The variable was originally tested with absolute URLs, and the subsequent
examples/docs use absolute URLs (https://docs.civicrm.org/dev/en/latest/framework/filesystem/).
These values are used to generate addresses, as in:
```php
$abs = Civi::paths()->getUrl('[civicrm.packages]/foo.js', 'absolute');
$rel = Civi::paths()->getUrl('[civicrm.packages]/foo.js', 'relative');
```
The patch allows more values in `$civicrm_paths` while ensuring that
`getUrl()` works as expected.
Before
------
The `getUrl()` requests only behave correctly if the override is an absolute URL - not if it's relative.
After
-----
The `getUrl()` requests behave correctly if the override is either an absolute URL or a relative URL.
```php
$civicrm_paths['civicrm.packages']['url'] = 'https://example.com/libraries/civicrm/packages';
$civicrm_paths['civicrm.packages']['url'] = '/libraries/civicrm/packages';
```
Comments
--------
* `toAbsoluteUrl()` needs a base to prepend. I initially used `HTTP_HOST`
but switched to `cms.root`, but correctly inferring scheme and host and port
and httpd prefixes would be more complex - esp for background/CLI jobs.
Using `cms.root` as the base is simpler.
* It's tempting to allow recursive variables. But it's not actually needed for
my purposes, and it would add complexity/maintenance. If it's really needed,
one could update `toAbsoluteUrl()` to quickly check for variables
(`$url[0] === '['`) and then evaluate them. But for now... I think the
simpler format is fine.