Add query and fragment encoding to redirect URIs

Fixes gh-152
Rename frameworkEndpointMapping

Fixes gh-158