Support refrences like {request.paramns.domain} in urls for proxy handlers

This bundles https://github.com/wikimedia/restbase/pull/38 with the suggested `expandVar` improvement.