use the same regex for lucene escapes, close #143

The escapes for the value were updated recently but the escapes for the
query were forgotten.
Now we use a variable for the regex to reduce duplication.

Signed-off-by: Johannes Dewender <github@JonnyJD.net>
move lucene_special to the top as a constant

Signed-off-by: Johannes Dewender <github@JonnyJD.net>
Merge remote-tracking branch 'origin/diverged_pattern'

Signed-off-by: Alastair Porter <alastair@porter.net.nz>