Pattern (and JavaScript) escaping betterness

Makes string.JavascriptSafe work more nicely
Adds string.PatternSafe, changing current code that escapes patterns to use it
Makes default search providers for Sandbox use string.PatternSafe, stopping the spawn menu from creating errors when special characters are passed to its search box.
um, `["'"] = "\\'"`? You don't need to escape `'`s in `"`s