spec: add test for last-pattern

add helper functions in .themisrc
spec: add failing test for last-patten with empty
Fix to handle last-patten with incsearch#magic
Merge branch 'fix-lastpattern-with-magic' into dev