### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

Currently the VTL template for `request_templates` is not processed properly:

```
#set( $body = $input.json("$") )

#macro( loop $map )
{
    #foreach($key in $map.keySet())
        #set( $k = $util.escapeJavaScript($key) )
        #set( $v = $util.escapeJavaScript($map.get($key)).replaceAll("\\'", "'") )
        "$k": "$v"
        #if( $foreach.hasNext ) , #end
    #end
}
#end

{
    "enhancedAuthContext": #loop($context.authorizer),

    "headers": #loop($input.params().header),

    "query": #loop($input.params().querystring),

    "path": #loop($input.params().path),

    "identity": #loop($context.identity),

    "stageVariables": #loop($stageVariables),
}
EOF
}
```

results in,

```
'

{
    "enhancedAuthContext": {
    }
,

    "headers": {
    }
,

    "query": {
    }
,

    "path": {
    }
,

    "identity": {
    }
,

    "stageVariables": {
    }
,
}
'
```

### Expected Behavior

The template should be rendered and have the JSON properties.

### How are you starting LocalStack?

Custom (please describe below)

### Steps To Reproduce

#### How are you starting localstack (e.g., `bin/localstack` command, arguments, or `docker-compose.yml`)

    docker run localstack/localstack

#### Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)

    awslocal s3 mb s3://mybucket


### Environment

```markdown
- OS: MacOS
- LocalStack: 0.14
```


### Anything else?

This example can be used to validate.
https://github.com/localstack/localstack-terraform-samples/tree/master/apigateway-lambda-velocity
def test_extract_query_params(self):
        path, query_params = apigateway_listener.extract_query_string_params(
            "/foo/bar?foo=foo&bar=bar&bar=baz"
        )
        self.assertEqual("/foo/bar", path)
        self.assertEqual({"foo": "foo", "bar": ["bar", "baz"]}, query_params)
    def test_extract_path_params(self):
        params = apigateway_listener.extract_path_params("/foo/bar", "/foo/{param1}")
        self.assertEqual({"param1": "bar"}, params)
        params = apigateway_listener.extract_path_params("/foo/bar1/bar2", "/foo/{param1}/{param2}")
        self.assertEqual({"param1": "bar1", "param2": "bar2"}, params)
        params = apigateway_listener.extract_path_params("/foo/bar", "/foo/bar")
        self.assertEqual({}, params)
        params = apigateway_listener.extract_path_params("/foo/bar/baz", "/foo/{proxy+}")
        self.assertEqual({"proxy": "bar/baz"}, params)
    def test_path_matches(self):
        path, details = apigateway_listener.get_resource_for_path("/foo/bar", {"/foo/{param1}": {}})
        self.assertEqual("/foo/{param1}", path)
        path, details = apigateway_listener.get_resource_for_path(
            "/foo/bar", {"/foo/bar": {}, "/foo/{param1}": {}}
        )
        self.assertEqual("/foo/bar", path)
        path, details = apigateway_listener.get_resource_for_path(
            "/foo/bar/baz", {"/foo/bar": {}, "/foo/{proxy+}": {}}
        )
        self.assertEqual("/foo/{proxy+}", path)
        path, details = apigateway_listener.get_resource_for_path(
            "/foo/bar/baz", {"/{proxy+}": {}, "/foo/{proxy+}": {}}
        )
        self.assertEqual("/foo/{proxy+}", path)