textmessage: fix encoding problem
textmessage: fix encoding problem

- Read the text message json file in QSring UTF-8 instead
of QByteArray to force the encoding
- Check if there is an error on decoding to
avoid segmentation fault
- Correctly set the the text stream to use UTF-8
when saving text message history file

Change-Id: I70d61d5fbc5cae5de6119898de1954eef7f8ea5a
Tuleap: #223

savoirfairelinux/ring-lrc,savoirfairelinux/ring-lrc,savoirfairelinux/ring-lrc,savoirfairelinux/ring-lrc,savoirfairelinux/ring-lrc