Move addition of qs params after normalization

This refactor executes normalize_path/1 before appending the bound query
string parameters.

COUCHDB-2031
Add test for path normalization with qs params

COUCHDB-2031
Merge branch '2031-fix-qs-rewrite'

Closes COUCHDB-2031