Changed the "key" of the id_range end variable

startkey_docid was used while the api assumes endkey_docid