setDocAsUpsert() now returns the Document.
Merge pull request #524 from rayward/fix-setdocasupsert-return

setDocAsUpsert() now returns the Document.
Merge remote-tracking branch 'upstream/master' into analyze-api

Conflicts:
	changes.txt