Refactor encoding menu creation

This is an interim solution to the duplicated entries in the encoding menu and memory leaks.

Changes:
* Use of codec MIBs instead of names significantly decreases number of iterations.
* Remove duplicated codecs.
* Fix memory leaks which were caused by wrong parenting and empty menus.
* Do not add separator if menu is empty.

TODO:
* menus should be hard coded and organised by language groups (like Firefox) instead of charset groups or at least sorted alphanumerically
* createEncodingMenu should be called only once, instead of each time user accesses it

It's deprecated in Qt 5. See http://qt-project.org/doc/qt-5/qtalgorithms-obsolete.html#qSort-3