fixes ace editor cutting off viewing code

Jira ticket https://issues.apache.org/jira/browse/COUCHDB-2454
Maybe avoid the duplicate code and stick the shared function in a var for re-use.
```javascript
var onResize = _.debounce(function () { that.editor.resize(true); }, 500);
$(window).resize(onResize);
$(window).click(onResize);
```

Tempting to stick 500 in constants.js, too.... but meh, that's probably overkill.