COUCHDB-2342 - Url-encode document-ids properly

Url-encode document-ids properly
 
- modify the helper to also urlencode on `%`

Closes COUCHDB-2342