terminfo: support the st terminal
terminfo: incorrect struct field types and bugs in loading code