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

This looks surprisingly complex. I would propose the following to simplify it:

- define a context of `{ request: parentRequest, response: response || null }`.
- If the variable starts with a $, strip that and split on /\./. Then (try to) iterate on the elements and dereference from the context with `try { context = context[pathBit] } catch (e) { // report error }` in each iteration.
- If the variable starts with a /, parse it as a URL template and pass in the context.
- else, treat it as a string literal.