JS backend: fixes after review: refactoring translateAsStatement etc.
JS backend: support for while/do while with complex conditions
~~~ refactor WhenTranslator
~~~ small refactoring: Translation, TranslationUtils, BinaryOperationTranslation