Leave cursor on blank autoindented line when return pressed within matched pair

This change adds checks for `insertNewline` that see whether the cursor is within a matched bracket pair, and if they are, adds an extra newline, puts the cursor on the created empty line and autoindents. That is, when we have this (where `|` denotes cursor position):

```
function foo() {|}
```

and we press enter, we used to get this:

```
function foo() {
|}
```

but now we get this:

```
function foo() {
  |
}
```