Initial cleanup of editor JavaScript + schema sorting

Started breaking out and reorganizing some of the editor JavaScript to make it a little less obnoxious to maintain, also added a toggle to sort the schema alphabetically per [this request](http://meta.stackoverflow.com/questions/181365/sort-the-table-and-column-by-name-in-data-explorer).