RestClient: allow passing global substitues

Signed-off-by: Peter Lieven <pl@kamp.de>
TemplateRenderer: Allow functions to work on global substitutes

Signed-off-by: Peter Lieven <pl@kamp.de>