Convert name to barejid on retrieving win in titlebar for otr messages

fixes #289
Fixed memory leaks from str_replace
Removed unused encode.xml
Merge branch 'master' into plugins