sysdb: Make sure to properly reset term attributes.
sysdb: Make sure to properly reset term attributes.

Don't record the "old" settings on each call to rawmode since we do that a lot
of times. Also, don't use up all atexit handler slots this way.

tokkee/sysdb,tokkee/sysdb,tokkee/sysdb,sysdb/sysdb,sysdb/sysdb,sysdb/sysdb