Mostly fix cursor coordinates. Implement cl_up.
Recover panics in main(), and reset the terminal before re-panicking.
Implement savelevel and getlevel; fixes leaving the dungeon.