Escape keyword base in complete functions.

This fixes a bug that would prevent completing if your keyword base contained
reserved regex characters like $ or \.
Allow additional keyword chars as prefix.

This fixes a bug wherein findstart would allow for punctuation at the beginning
of words but the complete functions would not. This allows for completion when
keywords start with punctuation like $myvar.
tests: Extract tests for find_matches_in_lines