Fix NPE when querying with prefetch

When I want to get the referenced documents in a 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.