Limit clipboard history to about 10,000 items

Once we reach the threshold we delete half the history to ensure a good amortized time complexity.
Grammars with no root scope are no longer shown in the UI

Only injection grammars should have an empty root scope, and if so, it does not make sense to allow the user to pick it as document grammar.
Update MASPreferences submodule
Record current replace string as part of macro find action

Previously we would only record it if the user invoked a replace action from the find dialog, but the user may invoke “find” from the dialog and then subsequently “replace” via keyboard/menu (where we would not record the string).
Find macro actions now populate the search/replace pasteboard

This should be consistent with TextMate 1.x and is required for the replace actions.
Update Onigmo submodule
Let editor_t remember (regexp) captures from editor_t::find
Implement kReplace / kReplaceAndFind actions

These are used when replaying macros.
Use temporary pasteboards when replaying macros

This applies to search, replace, and (unless disabled) regular pasteboard.
Avoid detached objects in core data store
Allow inline expansion of symbolic links (in file browser)

This is enabled by running: defaults write com.macromates.TextMate.preview allowExpandingLinks -bool YES
Ignore links when recursively expanding file browser items

Symbolic links can point to ancestor items and cause cycles, which would cause the (recursive) expansion to newer terminate.
Checkin release notes
Avoid duplicate entries on find/replace pasteboard
Add CoreData index to pasteboard entry content
Delay saving of pasteboard history by 30 seconds

Since we save the history during applicationWillTerminate: there is (in theory) no reason to periodically save the history, but in case of a crash or similar, we would not get to applicationWillTerminate:.
If any folding pattern is set as a scoped setting, use it

Previously we would fallback on the grammar’s folding patterns unless ‘foldingStartMarker’ was set, which meant setting just the stop marker or indented folding patterns, would be ignored.
Fix typo
Move some user defaults keys to Preferences/Keys.h
Update Projects preferences pane, adding 3 new options