faster iterator from fewer end-key comparisons
faster iterator from fewer end-key comparisons

If the app created an iterator with an endKeyExclusive, the previous
code would compare the current cursor key bytes against the end-key
bytes on every Next().

This change instead compares the current array index position against
the end-key array index position.

Change-Id: Ic29e6ce0e36a2f9d859489db4362ce051475be5e
Reviewed-on: http://review.couchbase.org/64725
Reviewed-by: Marty Schoch <ba9951d7d66412e2a57aea395f01176a793cf5eb@gmail.com>
Tested-by: Steve Yen <ef850f73f7832052d3c6d9b5ddd3a1716d9a57f1@gmail.com>

couchbaselabs/moss,steveyen/moss,steveyen/moss