Combine nested `if` blocks in JS

So for example
``` js
var ordBoolean = function (_) {
        return new Ord(eqBoolean, function (_18) {
            return function (_19) {
                if (!_18) {
                    if (!_19) {
                        return EQ.value;
                    };
                };
                if (!_18) {
                    if (_19) {
                        return LT.value;
                    };
                };
                if (_18) {
                    if (_19) {
                        return EQ.value;
                    };
                };
                if (_18) {
                    if (!_19) {
                        return GT.value;
                    };
                };
                throw "Failed pattern match";
            };
        });
    };
```
Becomes:
``` js
    var ordBoolean = function (_) {
        return new Ord(eqBoolean, function (_18) {
            return function (_19) {
                if (!_18 && !_19) {
                    return EQ.value;
                };
                if (!_18 && _19) {
                    return LT.value;
                };
                if (_18 && _19) {
                    return EQ.value;
                };
                if (_18 && !_19) {
                    return GT.value;
                };
                throw "Failed pattern match";
            };
        });
    };
```