Make TypingCommand::insertText() to take SelectionInDOMTree instead of VisibleSelection

This patch makes |TypingCommand::insertText()| to take |SelectionInDOMTree|
instead of |VisibleSelection| to reduce usage of |VisibleSelection| for
improving code health.

BUG=657237
TEST=n/a

Review-Url: https://codereview.chromium.org/2733183002
Cr-Commit-Position: refs/heads/master@{#455368}
bool TypingCommand::insertParagraphSeparator(Document& document) {
  if (TypingCommand* lastTypingCommand =
          lastTypingCommandIfStillOpenForTyping(document.frame())) {
    lastTypingCommand->setShouldRetainAutocorrectionIndicator(false);
    EditingState editingState;
    EventQueueScope eventQueueScope;
    lastTypingCommand->insertParagraphSeparator(&editingState);
    return !editingState.isAborted();
  }

  return TypingCommand::create(document, InsertParagraphSeparator, "", 0)
      ->apply();
}

bool TypingCommand::insertParagraphSeparator(Document& document) {
  if (TypingCommand* lastTypingCommand =
          lastTypingCommandIfStillOpenForTyping(document.frame())) {
    lastTypingCommand->setShouldRetainAutocorrectionIndicator(false);
    EditingState editingState;
    EventQueueScope eventQueueScope;
    lastTypingCommand->insertParagraphSeparator(&editingState);
    return !editingState.isAborted();
  }

  return TypingCommand::create(document, InsertParagraphSeparator, "", 0)
      ->apply();
}
