fix crash in updateIndex when last doc is a design doc

The conditional that skips indexing design docs advances the cursor
without updating the while loop condition (`keepGoing`). If the last row
in the cursor is a design doc, this will cause the next loop iteration
to read past the end of the cursor and throw a
CursorIndexOutOfBoundsException.
issue number #157

Initial port of iOS _bulk_get code

issue number #157

Additional updates

issue number #157 latest patch

issue number #157 - resolved failing unit tests

issue number #157, updates to BulkDownloader

issue number #157, improved _bulk_get body generation

Fix compile errors related to changes in issue #269

Now accepts multipart/mixed in _bulk_rev response

No longer accept gzip response from SG, improved checks for application/json type for docs with no attachments

issue number #157

Removed commented out code line
issue number #157

Removed expensive log call
Fixes #164 by porting from iOS

https://github.com/couchbase/couchbase-lite-java-core/issues/164
Fixes #139 by porting some of the changes from iOS

I did not attempt to port the refactoring related changes.

Also, I ran into issues porting one change in particular, see https://github.com/couchbase/couchbase-lite-android/issues/277

https://github.com/couchbase/couchbase-lite-android/issues/139
Merge pull request #175 from couchbase/feature/issue_164_revid_md5

Fixes #164 by porting from iOS
Merge pull request #176 from couchbase/feature/issue_139_startkey_docid

Fixes #139 by porting some of the changes from iOS
Document.getProperty should return null if a key doesn't exist

on ios https://github.com/couchbase/couchbase-lite-ios/blob/master/Source/API/CBLDocument.m#L226
it return nil if a key doesn't exist.
Merge pull request #177 from couchbase/master_andrei_fix

Document.getProperty should return null if a key doesn't exist
Merge pull request #173 from mjq/index_crash

Fix crash in updateIndex when last doc is a design doc
Fixes #281 by porting changes from iOS

https://github.com/couchbase/couchbase-lite-android/issues/281
Merge pull request #184 from couchbase/feature/issue_281_chan_remove

Fixes #281 by porting changes from iOS
Purge should not return a boolean.

This changes matches api spec.
Revert "Allow for query settings chaining"

This reverts commit 00057fc4bbd323e7ef98006ddd4ad482c8d33340.
Change method signature of getDirectory() to return File

This matches up with the Context object, which also returns a File.
Re-add Manager.VERSION
Fixes #66 (unnecessarily pushing attachments)

couchbase/couchbase-lite-android#66
Removed  dontSendMultipart = true; outside of if block
Add null check when closing pending requests.

In response to sporadic unit test failure.
Check to make sure that db is open before calling db.setLastSequence().

In reaction to seeing "java.lang.IllegalStateException: attempt to re-open an already-closed object: SQLiteDatabase" exceptions in unit test output.