ace nits and warning cleanup

- switch to `session.doc.setValue()` when replacing changed file contents - this preserves the undo stack (as per https://github.com/dart-lang/chromedeveditor/issues/1698)
- fix a checked mode issue in ace.dart
- address an analysis warning

@ussuri, @umop