Extract vim:escape_pattern_quotes

Improve readability and test coverage so someone else can
more easily see that this is about escaping quotes in the
pattern so that they'll actually match quotes in the user's
test string.
Extract vim:safe(Pattern) into predicate function