elasticsearch path components (eg doc id) should be url quoted

Otherwise a / in the id creates an invalid url thus causing an InvalidJsonResponseError (/ is perfectly valid in elasticsearch doc ids http://elasticsearch-users.115913.n3.nabble.com/Document-ID-conventions-td3432927.html).

This replaces #53 (hope it's right this time).