Ticket #2957: broken autocompletion in mcedit

...if system and file charsets are different.

Initial step: refactoring: do actual completion word substitution
outside of editcmd_dialog_completion_show().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
(edit_complete_word_cmd): make correct charset conversion

...before insert autocompletion result.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Add tests for coverage the bug.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>