cleanup kwdsearch templates

P.S. for simplicity rt (lookup) is assured to be of spaceless string in code generating it
cleanup KWS tests slightly