add dynamic rewriting
this change add the possibility to pass a function inside the list of rewrites rules instead of an object.
The function is expected to return a new list of rewrites rule. A rewrite function take the request as argument. This can be useful to return a list of path based on a request (like returning paths alowed for a user).
Ex:
{
"_id": "_design/test",
"rewrites": [
"function(req) { return [{\"from\": \"/db\", \"to\": \"../..\"}]; }"
]
}