First pass hoisting CodeMirror.replaceRange() and operation() up to
Document. Docment APIs now automatically ensure _masterEditor exists when
needed instead; however this may go awry if the Document is not guaranteed
to wind up in the working set or the current editor after the API call is
complete.
Merge remote-tracking branch 'origin/master' into pflynn/document-apis

* origin/master: (54 commits)
  tweak BootstrapReporter layout
  add TODO for issue 949
  Code review comments.
  Fixes for FileIndexManager changes
  move call to FileIndexManager function out of JSUtils so it uses correct FileIndexManager and ProjectManager
  JSLint fix
  fix bad manual merge
  update jslint global vars
  use reject()
  decode module file path
  decode file paths
  udpate comment
  remove file
  * added Menu API MenuItems are views on to Commands * made CommandManager use Command objects * Brackets now dynamically creates internal menus * added API for adding removing key bindings
  fix same issue as #924 for JavaScript quick edit
  New unit test UI. Separate UI and performance tests. Refacotor PerfUtils reporting.
  add getNativeModuleDirectoryPath api call
  updates for unsaved changes tests, but commented out for now
  - Change DocumentCommandHandler's keyup listener to only be attached while a   Ctrl+Tab sequence is in progress. Consolidate code a bit. - Validate arg to DocumentManager.getNextPrevFile()
  removing a duplicate include of mode/xml/xml
  ...
Merge remote-tracking branch 'origin/master' into pflynn/document-apis

* origin/master:
  Add ellipsis to Open and Open Folder menu items. Allow HTML entities in strings.
  Code review fixes
  JSLint fix
  Disabled state for menus now works JSLint and UseTabs menu items now work through commands for checked state Fixed Typos
Document API work:
* Rationalize getText()'s default line endings with other text getters
* Don't leak in the case where a Document auto-creates its master Editor
  but that Editor is never shown in the UI
* Move Editor.getLineText() -> Document.getLine()

- Centralize calls to EditorManager._createFullEditorForDocument()
- Fix some misleading docs
Merge remote-tracking branch 'origin/master' into pflynn/document-apis

* origin/master: (40 commits)
  Update About dialog sprint number
  Update CodeMirror SHA
  - Make 'Find in Files' result sections collapsible - Fix text spacing glitch with 'Find in Files' panel header
  Update SHA to reference latest CM merge
  Updated to work with merged CodeMirror for sprint 10
  Fix bugs in failing menu unit test
  fixed spacing
  unit test update for #957
  validate usage of '+' in keyboard shortcuts
  Unit test for #989
  Correctly find the existing menu item shortcut label
  Only fire toggle_node once
  Update master
  code review comments part 2
  PerfUtils calls to markStart() and addMeasurement() need to be balanced
  Code review comments
  finish UI init before loading extensions
  Update CodeMirror SHA
  update key binding unit tests, remaining key/menu bugs
  Squashed commit of the following:
  ...
Merge remote-tracking branch 'origin/master' into pflynn/document-apis

* origin/master:
  Save a DOM lookup by using an existing variable
  Fix for #1015: work around LESS bug (https://github.com/cloudhead/less.js/issues/831) by putting quotes around all relative URLs in our LESS files (except for URLs importing other LESS files, which are not subject to the bug since they're not preserved in the final output).
  Now maintains the horizontal scroll position, as well.
  Changed scrollDelta to scrollDeltaY, and rounded the value out.
  Use :visible to skip the entire directory if it is not visible.
  Fix JSLint error
  Add class 'vertical-scroll' to the working set when the scrollbar is present
  Now scrolls the document to the original position after adjusting the font size up or down.
- Remove Editor._getText()/_setText(). Former callers now use Document or
  raw CodeMirror APIs depending on circumstances.
- Fix bug where Document._text has wrong line endings after _makeNonEditable()
  (there was no user-visible bug though, since getText(true) is currently
  only called for dirty documents)
- Minor docs cleanups
- New unit test for line endings on save
- New unit test for ref counting and Editor "GC" (related to recent Document
  API changes)
- Add util waitsForDone() for tests to wait on a Promise easily (wraps
  waitsFor())
- Add util SpecRunnerUtils.deleteFile() to consolidate fs.unlink() usage
- Clean up DocumentCommandHandlers-test to use the above utils and to use
  FileUtils instead of raw brackets.fs calls
- Re-enable undo-related dirty/clean unit test now that it's expected to work
- Fix bug in unit test runner where trying to run a single suite also runs
  all suites for which its name is a prefix
Merge remote-tracking branch 'origin/master' into pflynn/document-apis

* origin/master: (45 commits)
  code review comments
  Update comments
  Update CodeMirror SHA
  code review fixes
  Restore Shift-Tab to outdent behavior
  Re-implement performance suite filtering due to RequireJS changes in SpecRunner
  Revert .json file listing of test suites.
  Add ExtensionUtils to root require context
  added a comment explaining why we aren't using jquery deferreds for the done loading notification
  Fix #971 (Find in Files treats \n, \r, etc. as regular expressions) -- Escape backslash too (and simplify escaping regexp to use char class instead of |).
  createTestWindowAndRun now waits for brackets to be completely done loading (so extensions are loaded before tests run)
  added a 'ready' event to brackets that fires when brackets is completely done loading
  Code review fixes. Combined both offset to lines functions into a single function
  Rewrote unit tests for JavaScriptInlineEditor to get JSUtils from the require context that was used to load the extension. We only need to do this in unit tests where we rely on JSUtils to get the DocumentManager, etc. from the current window.
  Modified ExtensionLoader to allow for retrieving the require context that loaded an extension
  Refactor loadStyleSheet. Change error handling.
  make red bolder
  provide way for unit tests to restore commands after a reset
  Changed click handler to use $.on so runtime added menus work
  Fixed bug where triangle wasn't updating correctly by toggling "scroll" events on double click show
  ...

Conflicts:
	test/BootstrapReporter.js
	test/UnitTestSuite.json
Merge pull request #980 from adobe/pflynn/document-apis

Expose useful CodeMirror APIs on Document