terminal: Various fixes
terminal: Various fixes

Fix several bugs in the previous patches.  Fix inverse inverse video
with bold attribute, incorrect duplication of attributes when scrolling
up, underline aliasing, bottom scroll margin adjustment when resizing,
and unnecessary sleep when sending terminal reports.  Change TERM
environment variable to xterm-256color to better reflect terminal
capabilities (although it still doesn't emulate all of xterm).

Signed-off-by: Callum Lowcay <30277750103c2cd3d9ca2faae7875553e95d86f7@callumscode.com>

sir-murray/weston,giucam/weston,mchalupa/weston,tulcod/wayland,giucam/weston,jonnylamb/weston,mchalupa/wayland,abooij/wayland,Tarnyko/weston-xdg_surface_present,eyolfson/weston,abooij/wayland,tulcod/wayland,sir-murray/wayland,eyolfson/weston,Gnurou/weston,Fantu/compositor-spice,krezovic/weston,krezovic/weston,mchalupa/wayland,eyolfson/wayland,eyolfson/wayland,tulcod/wayland,kwm81/weston,Gnurou/weston,bitfactor/wayland,udoprog/weston,Fantu/compositor-spice,Fantu/compositor-spice,sir-murray/wayland,kwm81/weston,xorgy/weston,mchalupa/wayland,eyolfson/wayland,sir-murray/weston,jonnylamb/weston,udoprog/weston,abooij/wayland,sir-murray/wayland,Tarnyko/weston-xdg_surface_present,bitfactor/wayland,bitfactor/wayland,xorgy/weston,mchalupa/weston