make MCCursorLibrary and MCLibraryController have their own undo managers
manage the sort order in the view controller not the library controller
some intermediate undo support and document saving
remove unnecessary code