Move term, terminfo out of extra.

cc #8784
auto merge of #11945 : xales/rust/libextra, r=huonw

cc #8784