Changed char[] to std::string in restext

Experimental changes
Some further refactoring and test corrections
Fix problem with gtest and pthread on some systems
Merge branch 'dev-string-in-restext' into dev

Merging branches after code review

This should fix buffer overflow problems with translation strings