translateAnnotations with partial mapping

LinearDoc:
* Allow partial rangeMappings for translateAnnotations
* Fallback to plaintext where range info is incomplete
* Fallback to segment end placement for references
* Inline span['data-mw'] (like img) if it only contains whitespace

LinearDoc.test.js, translate.test.json
* Test translateAnnotations with plaintext translation and range mapping

Change-Id: I960dbe6155a5ea859b716e4a8748002a513618a6
Merge "translateAnnotations with partial mapping"