Improve error messages
Fix NPE when querying with prefetch

When I also want to get the referenced documents in the view query I need to set prefetch to true. If I then reference a document that doesn't exist (yet) in the DB, this causes a NPE in CBL, while CouchDB just returns "null" for the document.

This should fix that behaviour, but I'm not sure if `docContents` being null will create any problems.
Merge pull request #298 from reisub/patch-1

Fix NPE when querying with prefetch
Merge branch 'release/1.0.3'
Merge branch 'feature/issue_307_repl_docids'
Added prefix matching via Query.prefixMatchLevel property

Pretty much a direct port of the Objective-C implementation.
Fixes #302
Merge pull request #309 from couchbase/feature/prefixmatch

Added prefix matching via Query.prefixMatchLevel property
Fixes #282

https://github.com/couchbase/couchbase-lite-java-core/issues/282
Merge remote-tracking branch 'upstream/master' into feature/issue_81