Fix tmux state restoration in general. Handle all values in tmux state dictionary. Don't keep a saved cursor position per grid, but only one global one for DECSC, and use the grid's cursor position to restore it from DECRST 1049 (like tmux). Fix bug where tmux screens were restored improperly (max lines to restore was wrong). Don't copy primary grid to alt grid when showing alt grid the first time. Fix DECRC/DECSC which didn't actually save/restore the cursor position, only textual attributes.