CharsetConverter rework - part 04

This is a (hopefully) final part of CharsetConverter rework.
It's based on previous parts and include [Part 03](https://github.com/xbmc/xbmc/pull/3326) commits, so actual part 04 commits start from 62fb241 "remove unused parameter".
This part is FriBiDi related. BiDi wrapper function was simplified, optimized and fixed.
Some cosmetics and cleanup are included.