Little couchbase view fixes

According to the Api: http://docs.couchbase.com/admin/admin/REST/rest-views-get.html

- 'key' should be json encoded
- The id_range $end variable should go to 'endkey_docid'