fix bug 778464 - organice and clean code in wiki_ckeditor

https://bugzilla.mozilla.org/show_bug.cgi?id=778464

The change are really in wiki_ckeditor_translate.js to solve the bug.

As wiki_ckeditor.js is very similar to this one, I've cleaned and organized his code to have the same behavior in both sections.

Yep, there are lot of changes in the files, but this is caused for the code optimization and to improve the legibility of the code.

Tell me if any change is needed :)