Fix RIS behavior

This patch fixes the following behavior when RIS (hard reset) is invoked.

- Reset horizontal position to 1

```
$ echo -e "\033[1;10H\033c\x1b[6n" && cat
^[[1;10R
```
--> it should be "^[[1;1R"

- Reset bracketed paste mode.

```
~%   echo -e "\033[?2004h\033c" && cat
...(press Cmd-V)...
^[[200~pasted text from clipboard^[[201~
```

--> it should be "pasted text from clipboard".