JS backend: fix generated code for ternary operator

There was an error in JsToStringGenerationVisitor for nested conditional operators.
The conditional operator is right associative (see
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator),
but code in visit Conditional method assumes the left associativity.