Improve prompt.

- show user@host when root, logged from ssh, or inside sudo
- show error code on last command failure
Simplify terminal keys support.

Only take $TERM into account (drop -$VENDOR-$OSTYPE part).
Add terminal keys configurations for tmux/screen.