core: add hide of chars in string in evaluation of expressions

The syntax is: ${hide:char,string}.
All chars in string are replaced with char (which can be one or more chars).
tests: fix memory leak in hashtable tests
core: fix memory leak in completion