completion/cleanup: don't call CompletionProposal.setReplaceRange(), instead pass proposals to ScriptCompletionEngine.accept()
better doc and added some missing optional params for Array functions