Minor code cleanups, docs improvements, console message clarifications

* Whole bunch of docs clarifications & type-annotation fixes
* Clarify Save As dialog cancelation handling -- and fix bug where promise was never resolved in the degenerate case that just calls doSave()
* Improved some console messages: more explanatory KeyBindingManager error; more info on Directory exceptions; clarify consequence of LanguageManager error
* Fix misleading use of "document" in identifiers in Close Others API & related code
* Improve readme instructions for adding new locale translations